All URIs are relative to https://api.flat.io/v2
| Method | HTTP request | Description |
|---|---|---|
| gerUserLikes | GET /users/{user}/likes | List liked scores |
| getUser | GET /users/{user} | Get a public user profile |
| getUserScores | GET /users/{user}/scores | List user's scores |
[ScoreDetails] gerUserLikes(user, opts)
List liked scores
var FlatApi = require('flat-api');
var defaultClient = FlatApi.ApiClient.instance;
// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new FlatApi.UserApi();
var user = "user_example"; // String | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user.
var opts = {
'ids': true // Boolean | Return only the identifiers of the scores
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.gerUserLikes(user, opts, callback);| Name | Type | Description | Notes |
|---|---|---|---|
| user | String | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. | |
| ids | Boolean | Return only the identifiers of the scores | [optional] |
- Content-Type: application/json
- Accept: application/json
UserPublic getUser(user)
Get a public user profile
Get a public profile of a Flat User.
var FlatApi = require('flat-api');
var defaultClient = FlatApi.ApiClient.instance;
// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new FlatApi.UserApi();
var user = "user_example"; // String | This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getUser(user, callback);| Name | Type | Description | Notes |
|---|---|---|---|
| user | String | This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. |
- Content-Type: application/json
- Accept: application/json
[ScoreDetails] getUserScores(user, opts)
List user's scores
Get the list of public scores owned by a User. DEPRECATED: Please note that the current behavior will be deprecrated on 2019-01-01. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the Collections API instead.
var FlatApi = require('flat-api');
var defaultClient = FlatApi.ApiClient.instance;
// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new FlatApi.UserApi();
var user = "user_example"; // String | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user.
var opts = {
'parent': "parent_example" // String | Filter the score forked from the score id `parent`
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getUserScores(user, opts, callback);| Name | Type | Description | Notes |
|---|---|---|---|
| user | String | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. | |
| parent | String | Filter the score forked from the score id `parent` | [optional] |
- Content-Type: application/json
- Accept: application/json