Skip to content

Commit

Permalink
Making C# default language
Browse files Browse the repository at this point in the history
  • Loading branch information
cpluta committed Aug 11, 2019
1 parent 37d4aee commit 64cd15e
Show file tree
Hide file tree
Showing 13 changed files with 497 additions and 500 deletions.
54 changes: 27 additions & 27 deletions docs/authorization/generating_token.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,6 @@ Generating Token
Create a short lived access token to be used for authorized API calls. Typically a token will last 3600 seconds(one hour).

.. tabs::

.. group-tab:: REST

.. code-block:: http
POST https://auth.meshydb.com/{accountName}/connect/token HTTP/1.1
Content-Type: application/x-www-form-urlencoded
client_id={publicKey}&
grant_type=password&
username={username}&
password={password}&
scope=meshy.api offline_access
(Form-encoding removed, and line breaks added for readability)

|parameters|

accountName : :type:`string`, :required:`required`
Indicates which account you are connecting to.
publicKey : :type:`string`, :required:`required`
Public identifier of connecting service.
username : :type:`string`, :required:`required`
Unique identifier for user or device.
password : :type:`string`, :required:`required`
User secret credentials for login. When anonymous it is static as nopassword.

.. group-tab:: C#

Expand Down Expand Up @@ -78,6 +51,33 @@ Create a short lived access token to be used for authorized API calls. Typically
password : :type:`string`, :required:`required`
User secret credentials for login. When anonymous it is static as nopassword.

.. group-tab:: REST

.. code-block:: http
POST https://auth.meshydb.com/{accountName}/connect/token HTTP/1.1
Content-Type: application/x-www-form-urlencoded
client_id={publicKey}&
grant_type=password&
username={username}&
password={password}&
scope=meshy.api offline_access
(Form-encoding removed, and line breaks added for readability)

|parameters|

accountName : :type:`string`, :required:`required`
Indicates which account you are connecting to.
publicKey : :type:`string`, :required:`required`
Public identifier of connecting service.
username : :type:`string`, :required:`required`
Unique identifier for user or device.
password : :type:`string`, :required:`required`
User secret credentials for login. When anonymous it is static as nopassword.

.. rubric:: Responses

200 : OK
Expand Down
46 changes: 23 additions & 23 deletions docs/authorization/refreshing_token.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,6 @@ Once the token expires the refresh token can be used to generate a new set of cr

.. tabs::

.. group-tab:: REST

.. code-block:: http
POST https://auth.meshydb.com/{accountName}/connect/token HTTP/1.1
Content-Type: application/x-www-form-urlencoded
client_id={publicKey}&
grant_type=refresh_token&
refresh_token={refresh_token}
(Form-encoding removed, and line breaks added for readability)

|parameters|

accountName : :type:`string`, :required:`required`
Indicates which account you are connecting to.
publicKey : :type:`string`, :required:`required`
Public identifier of connecting service.
refresh_token : :type:`string`, :required:`required`
Refresh token generated from previous access token generation.

.. group-tab:: C#

.. code-block:: c#
Expand Down Expand Up @@ -87,6 +64,29 @@ Once the token expires the refresh token can be used to generate a new set of cr
refreshToken : :type:`string`, :required:`required`
Refresh token generated from previous access token generation.

.. group-tab:: REST

.. code-block:: http
POST https://auth.meshydb.com/{accountName}/connect/token HTTP/1.1
Content-Type: application/x-www-form-urlencoded
client_id={publicKey}&
grant_type=refresh_token&
refresh_token={refresh_token}
(Form-encoding removed, and line breaks added for readability)

|parameters|

accountName : :type:`string`, :required:`required`
Indicates which account you are connecting to.
publicKey : :type:`string`, :required:`required`
Public identifier of connecting service.
refresh_token : :type:`string`, :required:`required`
Refresh token generated from previous access token generation.

.. rubric:: Responses

200 : OK
Expand Down
44 changes: 22 additions & 22 deletions docs/data/creating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,6 @@ Creating Data
Create new custom mesh data into specified mesh name.

.. tabs::

.. group-tab:: REST

.. code-block:: http
POST https://api.meshydb.com/{accountName}/meshes/{mesh} HTTP/1.1
Authentication: Bearer {access_token}
Content-Type: application/json
{
"firstName": "Bob",
"lastName": "Bobberson"
}
|parameters|

accountName : :type:`string`, :required:`required`
Indicates which account you are connecting to.
access_token : :type:`string`, :required:`required`
Token identifying authorization with MeshyDB requested during `Generating Token <../authorization/generating_token.html#generating-token>`_.
mesh : :type:`string`, :required:`required`
Identifies name of mesh collection. e.g. person.

.. group-tab:: C#

Expand Down Expand Up @@ -93,6 +71,28 @@ Create new custom mesh data into specified mesh name.
meshName : :type:`string`, :required:`required`
Identifies name of mesh collection. e.g. person.

.. group-tab:: REST

.. code-block:: http
POST https://api.meshydb.com/{accountName}/meshes/{mesh} HTTP/1.1
Authentication: Bearer {access_token}
Content-Type: application/json
{
"firstName": "Bob",
"lastName": "Bobberson"
}
|parameters|

accountName : :type:`string`, :required:`required`
Indicates which account you are connecting to.
access_token : :type:`string`, :required:`required`
Token identifying authorization with MeshyDB requested during `Generating Token <../authorization/generating_token.html#generating-token>`_.
mesh : :type:`string`, :required:`required`
Identifies name of mesh collection. e.g. person.

.. rubric:: Responses

201 : Created
Expand Down
36 changes: 18 additions & 18 deletions docs/data/deleting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,6 @@ Permanently remove Mesh data from collection.

.. tabs::

.. group-tab:: REST

.. code-block:: http
DELETE https://api.meshydb.com/{accountName}/meshes/{mesh}/{id} HTTP/1.1
Authentication: Bearer {access_token}
|parameters|

accountName : :type:`string`, :required:`required`
Indicates which account you are connecting to.
access_token : :type:`string`, :required:`required`
Token identifying authorization with MeshyDB requested during `Generating Token <../authorization/generating_token.html#generating-token>`_.
mesh : :type:`string`, :required:`required`
Identifies name of mesh collection. e.g. person.
id : :type:`string`, :required:`required`
Identifies unique record of Mesh data to remove.

.. group-tab:: C#

.. code-block:: c#
Expand Down Expand Up @@ -79,6 +61,24 @@ Permanently remove Mesh data from collection.
id : :type:`string`, :required:`required`
Identifies unique record of Mesh data to remove.

.. group-tab:: REST

.. code-block:: http
DELETE https://api.meshydb.com/{accountName}/meshes/{mesh}/{id} HTTP/1.1
Authentication: Bearer {access_token}
|parameters|

accountName : :type:`string`, :required:`required`
Indicates which account you are connecting to.
access_token : :type:`string`, :required:`required`
Token identifying authorization with MeshyDB requested during `Generating Token <../authorization/generating_token.html#generating-token>`_.
mesh : :type:`string`, :required:`required`
Identifies name of mesh collection. e.g. person.
id : :type:`string`, :required:`required`
Identifies unique record of Mesh data to remove.

.. rubric:: Responses

204 : No Content
Expand Down
48 changes: 24 additions & 24 deletions docs/data/retrieving.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,6 @@ Retrieve single item from Mesh collection.

.. tabs::

.. group-tab:: REST

.. code-block:: http
GET https://api.meshydb.com/{accountName}/meshes/{mesh}/{id} HTTP/1.1
Authentication: Bearer {access_token}
Content-Type: application/json
{
"firstName": "Bob",
"lastName": "Bobberson"
}
|parameters|

accountName : :type:`string`, :required:`required`
Indicates which account you are connecting to.
access_token : :type:`string`, :required:`required`
Token identifying authorization with MeshyDB requested during `Generating Token <../authorization/generating_token.html#generating-token>`_.
mesh : :type:`string`, :required:`required`
Identifies name of mesh collection. e.g. person.
id : :type:`string`, :required:`required`
Identifies location of what Mesh data to retrieve.

.. group-tab:: C#

.. code-block:: c#
Expand Down Expand Up @@ -92,6 +68,30 @@ Retrieve single item from Mesh collection.
id : :type:`string`, :required:`required`
Identifies location of what Mesh data to retrieve.

.. group-tab:: REST

.. code-block:: http
GET https://api.meshydb.com/{accountName}/meshes/{mesh}/{id} HTTP/1.1
Authentication: Bearer {access_token}
Content-Type: application/json
{
"firstName": "Bob",
"lastName": "Bobberson"
}
|parameters|

accountName : :type:`string`, :required:`required`
Indicates which account you are connecting to.
access_token : :type:`string`, :required:`required`
Token identifying authorization with MeshyDB requested during `Generating Token <../authorization/generating_token.html#generating-token>`_.
mesh : :type:`string`, :required:`required`
Identifies name of mesh collection. e.g. person.
id : :type:`string`, :required:`required`
Identifies location of what Mesh data to retrieve.

.. rubric:: Responses

200 : OK
Expand Down
58 changes: 29 additions & 29 deletions docs/data/searching.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,6 @@ Filter Mesh data from collection based on query parameters.

.. tabs::

.. group-tab:: REST

.. code-block:: http
GET https://api.meshydb.com/{accountName}/meshes/{mesh}?filter={filter}&
orderby={orderby}&
page={page}&
pageSize={pageSize} HTTP/1.1
Authentication: Bearer {access_token}
(Line breaks added for readability)

|parameters|

accountName : :type:`string`, :required:`required`
Indicates which account you are connecting to.
access_token : :type:`string`, :required:`required`
Token identifying authorization with MeshyDB requested during `Generating Token <../authorization/generating_token.html#generating-token>`_.
mesh : :type:`string`, :required:`required`
Identifies name of mesh collection. e.g. person.
filter : :type:`string`
Criteria provided in a MongoDB format to limit results.
orderby : :type:`string`
Defines which fields need to be sorted and direction in a MongoDB format.
page : :type:`integer`, default: 1
Page number of results to bring back.
pageSize : :type:`integer`, max: 200, default: 25
Number of results to bring back per page.

.. group-tab:: C#

.. code-block:: c#
Expand Down Expand Up @@ -108,7 +79,36 @@ Filter Mesh data from collection based on query parameters.
Page number of results to bring back.
pageSize : :type:`integer`, max: 200, default: 25
Number of results to bring back per page.

.. group-tab:: REST

.. code-block:: http
GET https://api.meshydb.com/{accountName}/meshes/{mesh}?filter={filter}&
orderby={orderby}&
page={page}&
pageSize={pageSize} HTTP/1.1
Authentication: Bearer {access_token}
(Line breaks added for readability)

|parameters|

accountName : :type:`string`, :required:`required`
Indicates which account you are connecting to.
access_token : :type:`string`, :required:`required`
Token identifying authorization with MeshyDB requested during `Generating Token <../authorization/generating_token.html#generating-token>`_.
mesh : :type:`string`, :required:`required`
Identifies name of mesh collection. e.g. person.
filter : :type:`string`
Criteria provided in a MongoDB format to limit results.
orderby : :type:`string`
Defines which fields need to be sorted and direction in a MongoDB format.
page : :type:`integer`, default: 1
Page number of results to bring back.
pageSize : :type:`integer`, max: 200, default: 25
Number of results to bring back per page.

.. rubric:: Responses

200 : OK
Expand Down
Loading

0 comments on commit 64cd15e

Please sign in to comment.