All URIs are relative to https://oas.mieuxvoter.fr
Method | HTTP request | Description |
---|---|---|
deleteUserItem | DELETE /users/{id} | Removes the User resource. |
getUserCollection | GET /users | Retrieves the collection of Users. |
getUserItem | GET /users/{id} | Gets information about a User. |
postCredentialsItem | POST /_jwt | Returns an authentication Token from login Credentials. |
postUserCollection | POST /users | Registers a new User. |
putUserItem | PUT /users/{id} | Updates information about a User. |
void deleteUserItem()
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);
let body:.UserApiDeleteUserItemRequest = {
// string | Universally Unique IDentifier (UUID)
id: "d434a72c-20cb-480f-9955-1fa2ce2e91b1",
};
apiInstance.deleteUserItem(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | Universally Unique IDentifier (UUID) | defaults to undefined |
void
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
204 | User resource deleted | - |
404 | Resource not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2005 getUserCollection()
Only administrators are allowed to access this.
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);
let body:.UserApiGetUserCollectionRequest = {
// number | The collection page number (optional)
page: 1,
};
apiInstance.getUserCollection(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
page | [number] | The collection page number | (optional) defaults to 1 |
InlineResponse2005
- Content-Type: Not defined
- Accept: application/ld+json, application/json, text/html
Status code | Description | Response headers |
---|---|---|
200 | User collection response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserjsonldRead getUserItem()
You are authorized to get information about yourself only.
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);
let body:.UserApiGetUserItemRequest = {
// string | Universally Unique IDentifier (UUID)
id: "d434a72c-20cb-480f-9955-1fa2ce2e91b1",
};
apiInstance.getUserItem(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | Universally Unique IDentifier (UUID) | defaults to undefined |
UserjsonldRead
- Content-Type: Not defined
- Accept: application/ld+json, application/json, text/html
Status code | Description | Response headers |
---|---|---|
200 | User resource response | - |
404 | Resource not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void postCredentialsItem()
Creating and participating to private polls require authentication. The Token returned is a JWT valid for one hour.
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);
let body:.UserApiPostCredentialsItemRequest = {
// Credentials | User Credentials (optional)
credentials: {
usernameOrEmail: "michel",
password: "~5Up3®$3cR3741337",
},
};
apiInstance.postCredentialsItem(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
credentials | Credentials | User Credentials |
void
- Content-Type: application/ld+json, application/json
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | A JSON Web Token (JWT) | - |
400 | Bad credentials. | - |
401 | Unauthorized credentials. | - |
402 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserjsonldRead postUserCollection()
Registers a new User in the database. The email is optional and will help you reset a forgotten password.
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);
let body:.UserApiPostUserCollectionRequest = {
// UserjsonldCreate | The new User resource (optional)
userjsonldCreate: {
email: "email_example",
username: "username_example",
password: "password_example",
},
};
apiInstance.postUserCollection(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
userjsonldCreate | UserjsonldCreate | The new User resource |
UserjsonldRead
- Content-Type: application/ld+json, application/json, text/html
- Accept: application/ld+json, application/json, text/html
Status code | Description | Response headers |
---|---|---|
201 | User resource created | - |
400 | Invalid input | - |
404 | Resource not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserjsonldRead putUserItem()
Logged-in users are authorized to update information about themselves only.
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);
let body:.UserApiPutUserItemRequest = {
// string | Universally Unique IDentifier (UUID)
id: "d434a72c-20cb-480f-9955-1fa2ce2e91b1",
// UserjsonldEdit | The updated User resource (optional)
userjsonldEdit: {
email: "email_example",
username: "username_example",
password: "password_example",
},
};
apiInstance.putUserItem(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
userjsonldEdit | UserjsonldEdit | The updated User resource | |
id | [string] | Universally Unique IDentifier (UUID) | defaults to undefined |
UserjsonldRead
- Content-Type: application/ld+json, application/json, text/html
- Accept: application/ld+json, application/json, text/html
Status code | Description | Response headers |
---|---|---|
200 | User resource updated | - |
400 | Invalid input | - |
404 | Resource not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]