Skip to content

Latest commit

 

History

History
57 lines (38 loc) · 1.59 KB

ResourcesApi.md

File metadata and controls

57 lines (38 loc) · 1.59 KB

uclapi.ResourcesApi

All URIs are relative to https://uclapi.com

Method HTTP request Description
resourcesDesktopsGet GET /resources/desktops Returns number of desktops and how many are free at the time of making the request.

resourcesDesktopsGet

InlineResponse20011 resourcesDesktopsGet()

Returns number of desktops and how many are free at the time of making the request.

Example

import uclapi from '@uclapi/sdk';
let defaultClient = uclapi.ApiClient.instance;
// Configure OAuth2 access token for authorization: OAuthSecurity
let OAuthSecurity = defaultClient.authentications['OAuthSecurity'];
OAuthSecurity.accessToken = 'YOUR ACCESS TOKEN';
// Configure API key authorization: OAuthToken
let OAuthToken = defaultClient.authentications['OAuthToken'];
OAuthToken.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//OAuthToken.apiKeyPrefix = 'Token';

let apiInstance = new uclapi.ResourcesApi();
apiInstance.resourcesDesktopsGet((error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

This endpoint does not need any parameter.

Return type

InlineResponse20011

Authorization

OAuthSecurity, OAuthToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json