Updated Documentations to V1.0
This commit is contained in:
1 parent
668ef6a93e
commit
9f4b49ca4f
26 files changed
+467
-544
No files matched your search
@@ -0,0 +1,76 @@
|
||||
# Collection
|
||||
|
||||
Collection is a class that represents a collection in the MarcSync API.
|
||||
|
||||
<div style={{display: "grid", "grid-template-columns": "repeat(2,minmax(0,1fr))", "box-sizing": "border-box", "border-width": "0", "border-style": "solid", "word-break": "break-word"}}>
|
||||
|
||||
<div style={{"box-sizing": "border-box", "border-width": "0", "border-style": "solid", "word-break": "break-word", "font-weight": "600"}}>
|
||||
METHODS
|
||||
<ul style={{"padding-left": ".5rem", "list-style-type": "disc", "margin-bottom": "1.25rem", "list-style": "none", "box-sizing": "border-box", "border-width": "0", "border-style": "solid", "word-break": "break-word", "font-weight": "500"}}>
|
||||
<li style={{"margin-bottom": ".5rem", "list-style-type": "none"}}>
|
||||
<a style={{"display": "block"}} href="#createEntry">createEntry</a>
|
||||
<a style={{"display": "block"}} href="#updateEntries">updateEntries</a>
|
||||
<a style={{"display": "block"}} href="#getEntries">getEntries</a>
|
||||
<a style={{"display": "block"}} href="#deleteEntries">deleteEntries</a>
|
||||
<a style={{"display": "block"}} href="#drop">drop</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
## METHODS
|
||||
|
||||
### :createEntry(`data:` [EntryData](../types/EntryData))
|
||||
Creates a new entry in the collection and returns it as an [Entry](./Entry) object.
|
||||
|
||||
:::caution Exceptions
|
||||
|
||||
[InvalidAccessToken](../errors/Authorization#InvalidAccessToken) - Thrown when the `accessToken` is invalid.<br/>
|
||||
[CollectionNotFound](../errors/Collection#CollectionNotFound) - Thrown when the collection does not exist.<br/>
|
||||
[InvalidEntryData](../errors/Entry#InvalidEntryData) - Thrown when the [EntryData](../types/EntryData) is invalid.
|
||||
|
||||
:::
|
||||
|
||||
### :updateEntries(`filters:` [EntryData](../types/EntryData), `data:` [EntryData](../types/EntryData))
|
||||
Updates all entries that match the specified filters with the specified data.
|
||||
|
||||
:::caution Exceptions
|
||||
|
||||
[InvalidAccessToken](../errors/Authorization#InvalidAccessToken) - Thrown when the `accessToken` is invalid.<br/>
|
||||
[CollectionNotFound](../errors/Collection#CollectionNotFound) - Thrown when the collection does not exist.<br/>
|
||||
[InvalidEntryData](../errors/Entry#InvalidEntryData) - Thrown when the [EntryData](../types/EntryData) is invalid.
|
||||
|
||||
:::
|
||||
|
||||
### :getEntries(`filters:` [EntryData](../types/EntryData))
|
||||
Returns all entries that match the specified filters as an array of [Entry](./Entry) objects.
|
||||
|
||||
:::caution Exceptions
|
||||
|
||||
[InvalidAccessToken](../errors/Authorization#InvalidAccessToken) - Thrown when the `accessToken` is invalid.<br/>
|
||||
[CollectionNotFound](../errors/Collection#CollectionNotFound) - Thrown when the collection does not exist.<br/>
|
||||
[InvalidEntryData](../errors/Entry#InvalidEntryData) - Thrown when the [EntryData](../types/EntryData) is invalid.
|
||||
|
||||
:::
|
||||
|
||||
### :deleteEntries(`filters:` [EntryData](../types/EntryData))
|
||||
Deletes all entries that match the specified filters.
|
||||
|
||||
:::caution Exceptions
|
||||
|
||||
[InvalidAccessToken](../errors/Authorization#InvalidAccessToken) - Thrown when the `accessToken` is invalid.<br/>
|
||||
[CollectionNotFound](../errors/Collection#CollectionNotFound) - Thrown when the collection does not exist.<br/>
|
||||
[InvalidEntryData](../errors/Entry#InvalidEntryData) - Thrown when the [EntryData](../types/EntryData) is invalid.
|
||||
|
||||
:::
|
||||
|
||||
### :drop()
|
||||
Deletes the collection.
|
||||
|
||||
:::caution Exceptions
|
||||
|
||||
[InvalidAccessToken](../errors/Authorization#InvalidAccessToken) - Thrown when the `accessToken` is invalid.<br/>
|
||||
[CollectionNotFound](../errors/Collection#CollectionNotFound) - Thrown when the collection does not exist.<br/>
|
||||
|
||||
:::
|
||||
@@ -0,0 +1,49 @@
|
||||
# Entry
|
||||
|
||||
Entry is a class that represents an entry in the MarcSync API.
|
||||
|
||||
<div style={{display: "grid", "grid-template-columns": "repeat(2,minmax(0,1fr))", "box-sizing": "border-box", "border-width": "0", "border-style": "solid", "word-break": "break-word"}}>
|
||||
|
||||
<div style={{"box-sizing": "border-box", "border-width": "0", "border-style": "solid", "word-break": "break-word", "font-weight": "600"}}>
|
||||
METHODS
|
||||
<ul style={{"padding-left": ".5rem", "list-style-type": "disc", "margin-bottom": "1.25rem", "list-style": "none", "box-sizing": "border-box", "border-width": "0", "border-style": "solid", "word-break": "break-word", "font-weight": "500"}}>
|
||||
<li style={{"margin-bottom": ".5rem", "list-style-type": "none"}}>
|
||||
<a style={{"display": "block"}} href="#getValues">getValues</a>
|
||||
<a style={{"display": "block"}} href="#getValue">getValue</a>
|
||||
<a style={{"display": "block"}} href="#updateValues">updateValues</a>
|
||||
<a style={{"display": "block"}} href="#delete">delete</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
## METHODS
|
||||
|
||||
### :getValues()
|
||||
Returns all values of the entry as [EntryData](../types/EntryData).
|
||||
|
||||
|
||||
### :getValue(`key:` [string](https://www.lua.org/pil/2.4.html))
|
||||
Returns the value of the specified key.
|
||||
|
||||
### :updateValues(`data:` [EntryData](../types/EntryData))
|
||||
Updates the values of the entry with the specified data.
|
||||
|
||||
:::caution Exceptions
|
||||
|
||||
[InvalidAccessToken](../errors/Authorization#InvalidAccessToken) - Thrown when the `accessToken` is invalid.<br/>
|
||||
[CollectionNotFound](../errors/Collection#CollectionNotFound) - Thrown when the collection does not exist.<br/>
|
||||
[InvalidEntryData](../errors/Entry#InvalidEntryData) - Thrown when the [EntryData](../types/EntryData) is invalid.
|
||||
|
||||
:::
|
||||
|
||||
### :delete()
|
||||
Deletes the entry.
|
||||
|
||||
:::caution Exceptions
|
||||
|
||||
[InvalidAccessToken](../errors/Authorization#InvalidAccessToken) - Thrown when the `accessToken` is invalid.<br/>
|
||||
[CollectionNotFound](../errors/Collection#CollectionNotFound) - Thrown when the collection does not exist.<br/>
|
||||
|
||||
:::
|
||||
@@ -0,0 +1,52 @@
|
||||
# MarcSyncClient
|
||||
|
||||
A class that represents a MarcSync client.
|
||||
|
||||
<div style={{display: "grid", "grid-template-columns": "repeat(2,minmax(0,1fr))", "box-sizing": "border-box", "border-width": "0", "border-style": "solid", "word-break": "break-word"}}>
|
||||
|
||||
<div style={{"box-sizing": "border-box", "border-width": "0", "border-style": "solid", "word-break": "break-word", "font-weight": "600"}}>
|
||||
METHODS
|
||||
<ul style={{"padding-left": ".5rem", "list-style-type": "disc", "margin-bottom": "1.25rem", "list-style": "none", "box-sizing": "border-box", "border-width": "0", "border-style": "solid", "word-break": "break-word", "font-weight": "500"}}>
|
||||
<li style={{"margin-bottom": ".5rem", "list-style-type": "none"}}>
|
||||
<a style={{"display": "block"}} href="#getVersion">getVersion</a>
|
||||
<a style={{"display": "block"}} href="#fetchCollection">fetchCollection</a>
|
||||
<a style={{"display": "block"}} href="#getCollection">getCollection</a>
|
||||
<a style={{"display": "block"}} href="#createCollection">createCollection</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
## METHODS
|
||||
|
||||
### :getVersion(`clientId:` [number?](https://www.lua.org/pil/2.3.html))
|
||||
Returns the version of the client. If there is no `clientId` specified, it will return the version of the client that is currently running. If there is a `clientId` specified, it will return the version of the client that is running on the specified `clientId`.
|
||||
|
||||
| clientId | Corresponding Client |
|
||||
|----------|----------|
|
||||
| 1 | Roblox Client |
|
||||
| 2 | NodeJS Client |
|
||||
|
||||
### :fetchCollection(`collectionName:` [string](https://www.lua.org/pil/2.4.html))
|
||||
Fetches a collection from the MarcSync API and returns it as a [Collection](./Collection) object.
|
||||
|
||||
:::caution Exceptions
|
||||
|
||||
[InvalidAccessToken](../errors/Authorization#InvalidAccessToken) - Thrown when the `accessToken` is invalid.<br/>
|
||||
[CollectionNotFound](../errors/Collection#CollectionNotFound) - Thrown when the collection does not exist.
|
||||
|
||||
:::
|
||||
|
||||
### :getCollection(`collectionName:` [string](https://www.lua.org/pil/2.4.html))
|
||||
Returns a collection from the MarcSync API as a [Collection](./Collection) object. If the collection does not exist, you will get an exception upon trying to use the object.
|
||||
|
||||
### :createCollection(`collectionName:` [string](https://www.lua.org/pil/2.4.html))
|
||||
Creates a new collection in the MarcSync API and returns it as a [Collection](./Collection) object. If the collection already exists, you will get an exception.
|
||||
|
||||
:::caution Exceptions
|
||||
|
||||
[InvalidAccessToken](../errors/Authorization#InvalidAccessToken) - Thrown when the `accessToken` is invalid.<br/>
|
||||
[CollectionAlreadyExists](../errors/Collection#CollectionAlreadyExists) - Thrown when the collection already exists.
|
||||
|
||||
:::
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"label": "MarcSync Classes",
|
||||
"position": 2,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"description": "A list of all classes in the MarcSync library."
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user