Browse Source

base docs xD

modified-method-api
ojizero 4 years ago
parent
commit
94610d86a4
No known key found for this signature in database
GPG Key ID: FEBB7097845B0C7E
  1. 25
      README.md

25
README.md

@ -40,8 +40,33 @@ const someGetMethodWithParamPromise = YourAPIClient.someGetMethodWithParam(5) // @@ -40,8 +40,33 @@ const someGetMethodWithParamPromise = YourAPIClient.someGetMethodWithParam(5) //
## Documentation
### createPortalClient
(default exported method)
Used to create a portal base client.
#### Input
```
{
baseUrl?: string, // TODO: this shouldn't be optional but i can construct RequestConfig unless i set it as optional
// protocol?: 'http' | 'https',
// port?: number,
headers?: OutgoingHttpHeaders,
authentication?: Authentication,
retries?: number, // available from RequestOptions
timeout?: Seconds, // available from HttpsRequestOptions
onError?: 'reject' | 'resolve',
}
```
#### Output
```
{
route: MethodFactory,
resource: ResourceFactory,
_client: Client,
}
```
## Status
This is still a work in progress :D any help is appreciated

Loading…
Cancel
Save