Skip to content

Commit

Permalink
additional documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
LiranCohen committed Nov 24, 2023
1 parent a9e1cb0 commit e7798ab
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,20 @@ The query `request` contains the following properties:
- **`recipient`** - _`string`_ (_optional_): the DID in the `recipient` field of the record.
- **`schema`** - _`URI string`_ (_optional_): the URI of the schema bucket in which to query.
- **`dataFormat`** - _`Media Type string`_ (_optional_): the IANA string corresponding with the format of the data to filter for. See IANA's Media Type list here: https://www.iana.org/assignments/media-types/media-types.xhtml
- **`dateSort`** - _`DateSort`_ (_optional_): the `DateSort` value of the date field and direction to sort records by. Defaults to `CreatedAscending`.
- **`pagination`** - _`object`_ (_optional_): the properties used to paginate results.
- **`limit`** - _`number`_ (_optional_): the number of records that should be returned with this query. `undefined` returns all records.
- **`cursor`** - _`messageCid string`_ (_optional_): the `messageCid` of the records toc continue paginating from. This value is returned as a `cursor` in the response object of a `query` if there are more results beyond the `limit`.

#### **Response**

The query `response` contains the following properties:

- **`status`** - _`object`_: the status of the `request`:
- **`code`** - _`number`_: the `Response Status` code, following the response code patterns for `HTTP Response Status Codes`.
- **`detail`** _`string`_: a detailed message describing the response.
- **`records`** - _`Records array`_ (_optional_): the array of `Records` returned if the request was successful.
- **`cursor`** - _`messageCid string`_ (_optional_): the `messageCid` of the last message returned in the results if there are exist additional records beyond the specified `limit` in the `query`.

### **`web5.dwn.records.create(request)`**

Expand Down
14 changes: 14 additions & 0 deletions packages/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,20 @@ The query `request` contains the following properties:
- **`recipient`** - _`string`_ (_optional_): the DID in the `recipient` field of the record.
- **`schema`** - _`URI string`_ (_optional_): the URI of the schema bucket in which to query.
- **`dataFormat`** - _`Media Type string`_ (_optional_): the IANA string corresponding with the format of the data to filter for. See IANA's Media Type list here: https://www.iana.org/assignments/media-types/media-types.xhtml
- **`dateSort`** - _`DateSort`_ (_optional_): the `DateSort` value of the date field and direction to sort records by. Defaults to `CreatedAscending`.
- **`pagination`** - _`object`_ (_optional_): the properties used to paginate results.
- **`limit`** - _`number`_ (_optional_): the number of records that should be returned with this query. `undefined` returns all records.
- **`cursor`** - _`messageCid string`_ (_optional_): the `messageCid` of the records toc continue paginating from. This value is returned as a `cursor` in the response object of a `query` if there are more results beyond the `limit`.

#### **Response**

The query `response` contains the following properties:

- **`status`** - _`object`_: the status of the `request`:
- **`code`** - _`number`_: the `Response Status` code, following the response code patterns for `HTTP Response Status Codes`.
- **`detail`** _`string`_: a detailed message describing the response.
- **`records`** - _`Records array`_ (_optional_): the array of `Records` returned if the request was successful.
- **`cursor`** - _`messageCid string`_ (_optional_): the `messageCid` of the last message returned in the results if there are exist additional records beyond the specified `limit` in the `query`.

### **`web5.dwn.records.create(request)`**

Expand Down

0 comments on commit e7798ab

Please sign in to comment.