-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.json
1 lines (1 loc) · 27.3 KB
/
swagger.json
1
{"swagger":"2.0","info":{"title":"TwiceCast API","description":"TwiceCast api specification","version":"0.1.0","contact":{"name":"TwiceCast","email":"[email protected]"},"license":{"name":"MIT","url":"https://opensource.org/licenses/mit-license.php"}},"host":"api.twicecast.ovh","schemes":["https"],"produces":["application/json"],"consumes":["application/json"],"paths":{"/":{"options":{"tags":["Options"],"description":"Return description of API","responses":{"200":{"$ref":"#/responses/option"}}}},"/login":{"post":{"tags":["Login"],"parameters":[{"$ref":"#/parameters/login"}],"description":"This route is used to generate the JWT (RFC 7519) to access to route that need it.","responses":{"200":{"description":"Your JWT (RFC 7519)","schema":{"$ref":"#/definitions/jwt"}},"404":{"$ref":"#/responses/not_found"}}}},"/users":{"get":{"tags":["User"],"description":"Return all users","parameters":[{"$ref":"#/parameters/start"},{"$ref":"#/parameters/limit"},{"$ref":"#/parameters/jwt"}],"responses":{"200":{"$ref":"#/responses/user_list"},"404":{"$ref":"#/responses/not_found"}}},"post":{"tags":["User"],"description":"Create a user","responses":{"201":{"$ref":"#/responses/user"}},"parameters":[{"$ref":"#/parameters/register"}]},"parameters":[{"$ref":"#/parameters/jwt"}]},"/users/{user_id}":{"get":{"tags":["User"],"description":"Return one user","responses":{"200":{"$ref":"#/responses/user"},"401":{"$ref":"#/responses/unauthorized"},"403":{"$ref":"#/responses/forbidden"},"404":{"$ref":"#/responses/user_not_found"}}},"put":{"tags":["User"],"description":"replace one user","parameters":[{"$ref":"#/parameters/register"}],"responses":{"200":{"$ref":"#/responses/user"},"400":{"$ref":"#/responses/bad_request"},"401":{"$ref":"#/responses/unauthorized"},"403":{"$ref":"#/responses/forbidden"},"404":{"$ref":"#/responses/user_not_found"}}},"patch":{"tags":["User"],"description":"replace one user","parameters":[{"$ref":"#/parameters/register"}],"responses":{"200":{"$ref":"#/responses/user"},"400":{"$ref":"#/responses/bad_request"},"401":{"$ref":"#/responses/unauthorized"},"403":{"$ref":"#/responses/forbidden"},"404":{"$ref":"#/responses/user_not_found"}}},"delete":{"tags":["User"],"description":"delete a user","responses":{"204":{"description":"The user has been removed successfully."},"400":{"$ref":"#/responses/bad_request"},"401":{"$ref":"#/responses/unauthorized"},"403":{"$ref":"#/responses/forbidden"},"404":{"$ref":"#/responses/user_not_found"}}},"parameters":[{"$ref":"#/parameters/user_id"},{"$ref":"#/parameters/jwt"}]},"/users/{user_id}/organizations":{"get":{"tags":["User"],"description":"This give you the list of all your organization.","parameters":[{"$ref":"#/parameters/start"},{"$ref":"#/parameters/limit"}],"responses":{"200":{"$ref":"#/responses/organization_list"},"400":{"$ref":"#/responses/bad_request"},"401":{"$ref":"#/responses/unauthorized"},"403":{"$ref":"#/responses/forbidden"},"404":{"$ref":"#/responses/not_found"}}},"parameters":[{"$ref":"#/parameters/user_id"},{"$ref":"#/parameters/jwt"}]},"/users/{user_id}/avatar":{"get":{"tags":["User"],"description":"Return avatar","produces":["image/png","image/jpeg","image/gif"],"responses":{"200":{"$ref":"#/responses/avatar"},"400":{"$ref":"#/responses/bad_request"},"401":{"$ref":"#/responses/unauthorized"},"403":{"$ref":"#/responses/forbidden"},"404":{"$ref":"#/responses/user_not_found"}}},"put":{"tags":["User"],"description":"Replace avatar","consumes":["image/png","image/jpeg","image/gif"],"parameters":[{"$ref":"#/parameters/avatar"}],"responses":{"204":{"description":"The avatar has been replaced."},"400":{"$ref":"#/responses/bad_request"},"401":{"$ref":"#/responses/unauthorized"},"403":{"$ref":"#/responses/forbidden"},"404":{"$ref":"#/responses/user_not_found"},"415":{"description":"We only support png."}}},"parameters":[{"$ref":"#/parameters/user_id"},{"$ref":"#/parameters/jwt"}]},"/users/{user_id}/friends":{"get":{"tags":["User","Friend"],"description":"This give you the list of all your friend.","parameters":[{"$ref":"#/parameters/start"},{"$ref":"#/parameters/limit"}],"responses":{"200":{"$ref":"#/responses/user_list"},"400":{"$ref":"#/responses/bad_request"},"401":{"$ref":"#/responses/unauthorized"},"403":{"$ref":"#/responses/forbidden"},"404":{"$ref":"#/responses/not_found"}}},"parameters":[{"$ref":"#/parameters/user_id"},{"$ref":"#/parameters/jwt"}]},"/users/{user_id}/friends/{friend_id}":{"put":{"tags":["User","Friend"],"description":"Create a friend","responses":{"201":{"$ref":"#/responses/user"},"400":{"$ref":"#/responses/bad_request"},"401":{"$ref":"#/responses/unauthorized"},"403":{"$ref":"#/responses/forbidden"},"404":{"$ref":"#/responses/user_not_found"}}},"delete":{"tags":["User","Friend"],"description":"Delete a friend","responses":{"204":{"description":"This friend has been remove successfully."},"400":{"$ref":"#/responses/bad_request"},"401":{"$ref":"#/responses/unauthorized"},"403":{"$ref":"#/responses/forbidden"},"404":{"$ref":"#/responses/not_found"}}},"parameters":[{"$ref":"#/parameters/user_id"},{"$ref":"#/parameters/friend_id"},{"$ref":"#/parameters/jwt"}]},"/users/{user_id}/blocks":{"get":{"tags":["User","Block"],"description":"This give you the list of all your blocked user.","parameters":[{"$ref":"#/parameters/start"},{"$ref":"#/parameters/limit"}],"responses":{"200":{"$ref":"#/responses/user_list"},"400":{"$ref":"#/responses/bad_request"},"401":{"$ref":"#/responses/unauthorized"},"403":{"$ref":"#/responses/forbidden"},"404":{"$ref":"#/responses/not_found"}}},"parameters":[{"$ref":"#/parameters/user_id"},{"$ref":"#/parameters/jwt"}]},"/users/{user_id}/blocks/{block_id}":{"put":{"tags":["User","Block"],"description":"Create a block","responses":{"201":{"$ref":"#/responses/user"},"400":{"$ref":"#/responses/bad_request"},"401":{"$ref":"#/responses/unauthorized"},"403":{"$ref":"#/responses/forbidden"},"404":{"$ref":"#/responses/user_not_found"}}},"delete":{"tags":["User","Block"],"description":"Delete a block","responses":{"204":{"description":"This block has been remove successfully."},"400":{"$ref":"#/responses/bad_request"},"401":{"$ref":"#/responses/unauthorized"},"403":{"$ref":"#/responses/forbidden"},"404":{"$ref":"#/responses/not_found"}}},"parameters":[{"$ref":"#/parameters/user_id"},{"$ref":"#/parameters/block_id"},{"$ref":"#/parameters/jwt"}]},"/users/{user_id}/follows":{"get":{"tags":["User","Follow"],"description":"This give you the list of all your followed stream.","parameters":[{"$ref":"#/parameters/start"},{"$ref":"#/parameters/limit"}],"responses":{"200":{"$ref":"#/responses/stream_list"},"400":{"$ref":"#/responses/bad_request"},"401":{"$ref":"#/responses/unauthorized"},"403":{"$ref":"#/responses/forbidden"},"404":{"$ref":"#/responses/not_found"}}},"parameters":[{"$ref":"#/parameters/user_id"},{"$ref":"#/parameters/jwt"}]},"/users/{user_id}/follows/{follow_id}":{"put":{"tags":["User","Follow"],"description":"Create a follow","responses":{"201":{"$ref":"#/responses/user"},"400":{"$ref":"#/responses/bad_request"},"401":{"$ref":"#/responses/unauthorized"},"403":{"$ref":"#/responses/forbidden"},"404":{"$ref":"#/responses/user_not_found"}}},"delete":{"tags":["User","Follow"],"description":"Delete a follow","responses":{"204":{"description":"This follow has been remove successfully."},"400":{"$ref":"#/responses/bad_request"},"401":{"$ref":"#/responses/unauthorized"},"403":{"$ref":"#/responses/forbidden"},"404":{"$ref":"#/responses/not_found"}}},"parameters":[{"$ref":"#/parameters/user_id"},{"$ref":"#/parameters/follow_id"},{"$ref":"#/parameters/jwt"}]},"/users/{user_id}/subscribes":{"get":{"tags":["User","Subscribe"],"description":"This give you the list of all your subscribes subscribes.","parameters":[{"$ref":"#/parameters/start"},{"$ref":"#/parameters/limit"}],"responses":{"200":{"$ref":"#/responses/stream_list"},"400":{"$ref":"#/responses/bad_request"},"401":{"$ref":"#/responses/unauthorized"},"403":{"$ref":"#/responses/forbidden"},"404":{"$ref":"#/responses/not_found"}}},"parameters":[{"$ref":"#/parameters/user_id"},{"$ref":"#/parameters/jwt"}]},"/users/{user_id}/subscribes/{subscribe_id}":{"put":{"tags":["User","Subscribe"],"description":"Create a subscribe","responses":{"201":{"$ref":"#/responses/user"},"400":{"$ref":"#/responses/bad_request"},"401":{"$ref":"#/responses/unauthorized"},"403":{"$ref":"#/responses/forbidden"},"404":{"$ref":"#/responses/user_not_found"}}},"delete":{"tags":["User","Subscribe"],"description":"Delete a subscribe","responses":{"204":{"description":"This subscribe has been remove successfully."},"400":{"$ref":"#/responses/bad_request"},"401":{"$ref":"#/responses/unauthorized"},"403":{"$ref":"#/responses/forbidden"},"404":{"$ref":"#/responses/not_found"}}},"parameters":[{"$ref":"#/parameters/user_id"},{"$ref":"#/parameters/subscribe_id"},{"$ref":"#/parameters/jwt"}]},"/streams":{"get":{"tags":["Stream"],"description":"Return all streams","responses":{"200":{"$ref":"#/responses/stream_list"},"404":{"$ref":"#/responses/not_found"}}},"post":{"tags":["Stream"],"description":"Create a stream","parameters":[{"$ref":"#/parameters/stream"}],"responses":{"201":{"$ref":"#/responses/stream"}}},"parameters":[{"$ref":"#/parameters/jwt"}]},"/streams/{stream_id}":{"get":{"tags":["Stream"],"description":"get info of a stream","responses":{"200":{"$ref":"#/responses/stream"}}},"parameters":[{"$ref":"#/parameters/stream_id"},{"$ref":"#/parameters/jwt"}]},"/streams/{stream_id}/blocks":{"get":{"tags":["Stream"],"description":"Get the list of the users blocked in this stream, they can't access to the chat\n","responses":{"200":{"description":"todo"}}},"parameters":[{"$ref":"#/parameters/stream_id"},{"$ref":"#/parameters/jwt"}]},"/streams/{stream_id}/followers":{"get":{"tags":["Stream"],"description":"This route is intend to have all the followers of a stream","parameters":[{"$ref":"#/parameters/start"},{"$ref":"#/parameters/limit"}],"responses":{"200":{"description":"This will contain the followers of a stream, this result will be split. You need to call this route by increment start until you get a 204.\n"},"204":{"description":"This will be send if there are no other data."},"404":{"description":"Stream not found."}}},"put":{"tags":["Stream"],"description":"This route permit to user to follow a streamId","parameters":[{"$ref":"#/parameters/user"}],"responses":{"204":{"description":"Stream followed."}}},"parameters":[{"$ref":"#/parameters/stream_id"},{"$ref":"#/parameters/jwt"}]},"/streams/{stream_id}/subscribers":{"get":{"tags":["Stream"],"description":"This route is intend to have all the subscribers of a stream","parameters":[{"$ref":"#/parameters/start"},{"$ref":"#/parameters/limit"}],"responses":{"200":{"description":"This will contain the subscribers of a stream, this result will be split. You need to call this route by increment start until you get a 204.\n"},"204":{"description":"This will be send if there are no other data."},"404":{"description":"Stream not found."}}},"put":{"tags":["Stream"],"description":"This route permit to user to subscrib a streamId","parameters":[{"$ref":"#/parameters/user"}],"responses":{"204":{"description":"Stream subscribed."}}},"parameters":[{"$ref":"#/parameters/stream_id"},{"$ref":"#/parameters/jwt"}]},"/streams/{stream_id}/members":{"get":{"tags":["Stream"],"description":"Get users right on the stream","responses":{"200":{"description":"todo"}}},"parameters":[{"$ref":"#/parameters/stream_id"},{"$ref":"#/parameters/jwt"}]},"/streams/{stream_id}/chat":{"get":{"tags":["Stream"],"description":"This route provide the url of the server chat for this stream and the token that prouve that you can access to this chat.\n","responses":{"200":{"description":"This will contain the jwt that allow you to connect into the chat address give by the API. The JWT token contain an array of rights \"rights\": [\"id\",\"id\"] matching the following values: 8:'Founder', 9:'Co-Streamer', 10:'Moderator', 11,:'Contributor', 12:'Guest'\n","schema":{"$ref":"#/definitions/chat"}},"401":{"description":"Some chat are private, if you try to access to a private chat you need to authentificate and have been access granted\n"},"404":{"description":"Stream not found."}}},"parameters":[{"$ref":"#/parameters/stream_id"},{"$ref":"#/parameters/jwt"}]},"/streams/{stream_id}/event":{"get":{"tags":["Stream"],"description":"This route provide the url of the server event for this stream and the token that prouve that you can access to this chat. The event server is here to provide information about who follow\n","responses":{"200":{"description":"This will contain the jwt that allow you to connect into the event server give by the API.\n"},"401":{"description":"Some chat are private, if you try to access to a private chat you need to authentificate and have been access granted\n","schema":{"$ref":"#/definitions/event"}},"404":{"description":"Stream not found."}}},"parameters":[{"$ref":"#/parameters/stream_id"},{"$ref":"#/parameters/jwt"}]},"/streams/{stream_id}/repository":{"get":{"tags":["Stream"],"description":"This route provide the url of the server repository for this stream and the token that prouve that you can access to this repository. The repository server is here to provide information about who follow\n","responses":{"200":{"description":"This will contain the jwt that allow you to connect into the repository server give by the API.\n"},"401":{"description":"Some chat are private, if you try to access to a private chat you need to authentificate and have been access granted\n","schema":{"$ref":"#/definitions/repository"}},"404":{"description":"Stream not found."}}},"parameters":[{"$ref":"#/parameters/stream_id"},{"$ref":"#/parameters/jwt"}]},"/streams/{stream_id}/tags":{"get":{"tags":["Stream"],"description":"Get all tags on the stream","parameters":[{"$ref":"#/parameters/start"},{"$ref":"#/parameters/limit"}],"responses":{"200":{"$ref":"#/responses/tag_list"},"404":{"$ref":"#/responses/not_found"}}},"post":{"tags":["Stream"],"description":"This route permit to add a tag to a stream. Require to be stream's founder.","parameters":[{"$ref":"#/parameters/tag"}],"responses":{"200":{"$ref":"#/responses/tag"},"404":{"$ref":"#/responses/not_found"}}},"parameters":[{"$ref":"#/parameters/stream_id"},{"$ref":"#/parameters/jwt"}]},"/organizations":{"get":{"tags":["Organization"],"description":"Return all organizations","responses":{"200":{"$ref":"#/responses/organization_list"},"404":{"$ref":"#/responses/not_found"}}},"post":{"tags":["Organization"],"description":"Create a organization","responses":{"200":{"description":"The new organization created","schema":{"$ref":"#/definitions/organization"}}},"parameters":[{"$ref":"#/parameters/organization"}]},"parameters":[{"$ref":"#/parameters/jwt"}]},"/organizations/{organization_id}":{"get":{"tags":["Organization"],"description":"Return one organization","responses":{"200":{"$ref":"#/responses/organization"}}},"put":{"tags":["Organization"],"description":"Replace one organization","responses":{"200":{"$ref":"#/responses/organization"}}},"patch":{"tags":["Organization"],"description":"Patch one organization","responses":{"200":{"$ref":"#/responses/organization"}}},"delete":{"tags":["Organization"],"description":"delete a organization","responses":{"200":{"description":"done"}}},"parameters":[{"$ref":"#/parameters/organization_id"},{"$ref":"#/parameters/jwt"}]},"/organizations/{organization_id}/streams":{"get":{"tags":["Organization"],"description":"Return all stream","responses":{"200":{"description":"array of streams","schema":{"type":"array","items":{"$ref":"#/definitions/stream"}}}}},"post":{"tags":["Organization"],"description":"Create a stream","parameters":[{"$ref":"#/parameters/stream"}],"responses":{"201":{"description":"Stream created","schema":{"$ref":"#/definitions/stream"}},"401":{"description":"Unauthorized"},"404":{"description":"Organization not found"}}},"parameters":[{"$ref":"#/parameters/organization_id"},{"$ref":"#/parameters/jwt"}]},"/organizations/{organization_id}/members":{"get":{"tags":["Organization"],"description":"This will provide you all members of the organization.","responses":{"200":{"description":"This is an array of all members of the organization.","schema":{"type":"array","items":{"$ref":"#/definitions/user"}}}}},"post":{"tags":["Organization"],"description":"You can add a member to the organization","parameters":[{"$ref":"#/parameters/user"}],"responses":{"201":{"description":"Member added.","schema":{"$ref":"#/definitions/user"}},"404":{"description":"User or organization not found."}}},"parameters":[{"$ref":"#/parameters/organization_id"},{"$ref":"#/parameters/jwt"}]},"/tags":{"get":{"tags":["Tag"],"description":"Return all categories","parameters":[{"$ref":"#/parameters/limit"},{"$ref":"#/parameters/start"}],"responses":{"200":{"$ref":"#/responses/tag_list"},"400":{"$ref":"#/responses/bad_request"},"404":{"$ref":"#/responses/not_found"}}},"post":{"tags":["Tag"],"description":"Create a tag","parameters":[{"$ref":"#/parameters/tag"}],"responses":{"201":{"$ref":"#/responses/tag"},"400":{"$ref":"#/responses/bad_request"},"401":{"$ref":"#/responses/unauthorized"},"403":{"$ref":"#/responses/forbidden"}}},"parameters":[{"$ref":"#/parameters/jwt"}]},"/tags/{tag_id}":{"get":{"tags":["Tag"],"description":"Return one tag","responses":{"200":{"$ref":"#/responses/tag"}}},"put":{"tags":["Tag"],"description":"Replace one tag","responses":{"200":{"$ref":"#/responses/tag"}}},"patch":{"tags":["Tag"],"description":"Patch one tag","responses":{"200":{"$ref":"#/responses/tag"}}},"delete":{"tags":["Tag"],"description":"Delete a tag","responses":{"204":{"description":"The tag has been deleted."}}},"parameters":[{"$ref":"#/parameters/tag_id"},{"$ref":"#/parameters/jwt"}]}},"parameters":{"user":{"name":"user","in":"body","required":true,"schema":{"$ref":"#/definitions/user"},"description":"This represent an user."},"register":{"name":"user","in":"body","required":true,"schema":{"$ref":"#/definitions/register"},"description":"This is the information that the API remember about an user."},"user_id":{"name":"user_id","in":"path","required":true,"type":"integer","description":"This ID is provided by the API, it's used to indentified a unique user."},"block_id":{"name":"block_id","in":"path","required":true,"type":"integer","description":"This represent an user ID."},"friend_id":{"name":"friend_id","in":"path","required":true,"type":"integer","description":"This represent a user id."},"subscribe_id":{"name":"subscribe_id","in":"path","required":true,"type":"integer","description":"This represent a stream ID."},"follow_id":{"name":"follow_id","in":"path","required":true,"type":"integer","description":"This represent a stream id."},"avatar":{"name":"avatar","in":"body","required":true,"schema":{"$ref":"#/definitions/avatar"},"description":"Avatar is an image, if possible we want a png image. With a square as ratio.\n"},"stream":{"name":"stream","in":"body","required":true,"schema":{"$ref":"#/definitions/stream"},"description":"This represent a stream."},"stream_id":{"name":"stream_id","in":"path","required":true,"type":"integer","description":"This id is provide by the API to indentified a stream."},"organization":{"name":"organization","in":"body","required":true,"schema":{"$ref":"#/definitions/organization"},"description":"This represent an organization."},"organization_id":{"name":"organization_id","in":"path","required":true,"type":"integer","description":"This ID is provided by the API, it's used to indentified an unique organization."},"start":{"name":"start","in":"query","description":"Offset the results, for exemple if start is set to 5. Your result will not contains the first 5 results. It's begin by 0.\n","type":"integer","required":false},"limit":{"name":"limit","in":"query","description":"Limit the number of result, used with start. Limit permit to set the number of result that the API must send you.\n","type":"integer","minimum":0,"maximum":100,"required":false},"tag":{"name":"tag","in":"body","required":true,"schema":{"$ref":"#/definitions/tag"},"description":"This represent a tag."},"tag_id":{"name":"tag_id","in":"path","required":true,"type":"integer","description":"This id is provided by the API, it's used to indentified a unique tag."},"login":{"name":"login","in":"body","required":true,"schema":{"$ref":"#/definitions/login"},"description":"This represent the information needed when you want login."},"jwt":{"name":"Authorization","in":"header","type":"string","required":false,"description":"This API is JWT, you must add it to every request if possible.\n"}},"responses":{"avatar":{"description":"The avatar image.","schema":{"type":"file"}},"stream":{"description":"A stream.","schema":{"$ref":"#/definitions/stream"}},"user":{"description":"An User.","schema":{"$ref":"#/definitions/user"}},"user_list":{"description":"This will contain your users, this result will be split. You must recall this route by incrementing start of x times limit. x is the number of page that you want. If you ask for an out of range value, you will have a 404 error.\n","schema":{"type":"object","properties":{"user_list":{"type":"array","items":{"$ref":"#/definitions/user"}},"user_total":{"type":"integer"}}}},"user_not_found":{"description":"This user id doesn't exist, detail in the body.","schema":{"$ref":"#/definitions/error"}},"stream_list":{"description":"This will contain your streams, this result will be split. You must recall this route by incrementing start of x times limit. x is the number of page that you want. If you ask for an out of range value, you will have a 404 error.\n","schema":{"type":"object","properties":{"stream_list":{"type":"array","items":{"$ref":"#/definitions/stream"}},"stream_total":{"type":"integer"}}}},"stream_not_found":{"description":"This stream id doesn't exist, detail in the body.","schema":{"$ref":"#/definitions/error"}},"organization":{"description":"An organization.","schema":{"$ref":"#/definitions/organization"}},"organization_list":{"description":"This will contain your organizations, this result will be split. You must recall this route by incrementing start of x times limit. x is the number of page that you want. If you ask for an out of range value, you will have a 404 error.\n","schema":{"type":"object","properties":{"organization_list":{"type":"array","items":{"$ref":"#/definitions/organization"}},"organization_total":{"type":"integer"}}}},"option":{"description":"Return allow header.","headers":{"Allow":{"description":"List of method handle by /","type":"string"}}},"tag":{"description":"A tag.","schema":{"$ref":"#/definitions/tag"}},"tag_list":{"description":"This will contain your tags, this result will be split. You must recall this route by incrementing start of x times limit. x is the number of page that you want. If you ask for an out of range value, you will have a 404 error.\n","schema":{"type":"object","properties":{"tag_list":{"type":"array","items":{"$ref":"#/definitions/tag"}},"tag_total":{"type":"integer"}}}},"tag_not_found":{"description":"This tag id doesn't exist, detail in the body.","schema":{"$ref":"#/definitions/error"}},"bad_request":{"description":"The server cannot or will not process the request due to an apparent client error (e.g., malformed request syntax, too large size, invalid request message framing, or deceptive request routing). Detail in the body.\n","schema":{"$ref":"#/definitions/error"}},"unauthorized":{"description":"The jwt is needed or has no been provided. Detail in the body.","schema":{"$ref":"#/definitions/error"}},"forbidden":{"description":"The request was valid, but the server is refusing action. The user might not have the necessary permissions for a resource. Detail in the body.\n","schema":{"$ref":"#/definitions/error"}},"not_found":{"description":"The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.\n","schema":{"$ref":"#/definitions/error"}},"unsupported_media_type":{"description":"The request entity has a media type which the server or resource does not support. For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format.\n","schema":{"$ref":"#/definitions/error"}}},"definitions":{"stream":{"properties":{"id":{"type":"string"},"title":{"type":"string"},"lang":{"type":"string"},"private":{"type":"boolean"}}},"organization":{"properties":{"id":{"type":"string","description":"The unique id that represent an organization"},"name":{"type":"string","description":"The name of the organization"},"language":{"$ref":"#/definitions/language","description":"This is the natal language of the user"},"private":{"type":"boolean","description":"If true the organization is hidden"}}},"user":{"properties":{"id":{"type":"string","description":"This id is used in every request about this user."},"name":{"type":"string","description":"The public name of the user."},"language":{"$ref":"#/definitions/language"},"email":{"type":"string","format":"email","description":"The API use the email as login."},"register_date":{"type":"string","format":"dateTime","description":"This will be the date in UTC when the account has been create."},"private":{"type":"boolean","description":"You can choose to not be public."}},"example":{"id":42,"name":"TwiceCast","language":"FRA","email":"[email protected]","register_date":"2015-12-24T23:59:59.590Z","private":false}},"server":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"ipv4":{"type":"string"},"ipv6":{"type":"string"},"port":{"type":"integer"},"type":{"type":"integer"},"register_date":{"type":"string","format":"dateTime"}}},"country":{"properties":{"code":{"type":"integer","maxLength":3,"minLength":3,"description":"Numeric code ISO 3166"}}},"language":{"properties":{"code":{"type":"string","maxLength":3,"description":"The language of the user, conform to ISO 639"}}},"rank":{"properties":{"id":{"type":"string"},"title":{"type":"string"}}},"error":{"properties":{"url":{"type":"string","format":"url","description":"The url of the request"},"method":{"type":"string","description":"The verb http of the request"},"code":{"type":"integer","description":"The error code"},"description":{"type":"string","description":"Description of the error"}}},"tag":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"broadcasting":{"type":"integer","format":"uint64"},"short_description":{"type":"string"},"full_description":{"type":"string"},"linked-tag":{"type":"array","items":{"type":"string","format":"url"}}}},"avatar":{"type":"string","format":"binary","description":"This is the data of the image."},"register":{"properties":{"name":{"type":"string","description":"The public name of the user."},"email":{"type":"string","format":"email","description":"The API use the email as login."},"password":{"type":"string","format":"password","description":"The password will be hash by the server."},"language":{"$ref":"#/definitions/language"}}},"login":{"properties":{"email":{"type":"string","description":"The emails of the user."},"password":{"type":"string","description":"The clear password of the user, he will be hash by the server (SHA256)."}}},"jwt":{"properties":{"token":{"type":"string","description":"JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object.\n"}}},"chat":{"properties":{"url":{"type":"string","format":"url","description":"This is the url of the chat server."},"jwt":{"$ref":"#/definitions/jwt"}}},"event":{"properties":{"url":{"type":"string","format":"url","description":"This is the url of the event server."},"jwt":{"$ref":"#/definitions/jwt"}}},"repository":{"properties":{"url":{"type":"string","format":"url","description":"This is the url of the repository server."},"jwt":{"$ref":"#/definitions/jwt"}}}}}