dnai::api Class Reference
  #include <api.h>
Collaboration diagram for dnai::api:

Classes | |
| struct | User | 
Static Public Member Functions | |
| static QString const & | getToken () | 
| static QString const & | getId () | 
| static void | setUser (User const &) | 
| static http::Observable & | signin (QString const &, QString const &) | 
| static http::Observable & | refresh_token () | 
| static http::Observable & | get_current_user () | 
| static http::Observable & | get_files () | 
| static http::Observable & | get_file (QString const &) | 
| static http::Observable & | get_raw_file (QString const &) | 
| static http::Observable & | post_file (QString const &, QFile *) | 
| static http::Observable & | get_download_object (QString const &platform, QString const &slug) | 
| static void | logout () | 
Static Public Attributes | |
| static const http::Config | http_config | 
| static const QString | settings_key = "/current/user" | 
| static bool | rememberUser = false | 
| static bool | refreshing_token = false | 
| static quint64 | refreshing_delta = 3600 | 
| static const QString | client_id = "" | 
| static const QString | client_secret = "" | 
| static User | user = {} | 
Member Function Documentation
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
Member Data Documentation
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
Initial value:
= {
    "https://api.dnai.io/",
      {},
      {
        [](http::Url *url) {
            auto token = getToken();
            if (!token.isEmpty()) {
                url->addHeader("Authorization", "Bearer " + token);
            }
        },
        [](http::Url *url) {
            if (api::refreshing_token == false && QDateTime::currentDateTime().addSecs(api::refreshing_delta) >= api::user.expire_date) {
            }
        }
    }
  }
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
The documentation for this class was generated from the following files:
          
          
 1.8.9