Skip to content

Commit

Permalink
chore: cleanup & organize
Browse files Browse the repository at this point in the history
  • Loading branch information
gaschenk committed Jul 30, 2024
1 parent a9323f3 commit bc5536a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions docs/APIContract.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,29 @@ The base URL for an API should be: _baseURL_/_apiVersion_/ meaning even somethin
In order to provide a consistent API a metadata endpoint should be provided under _baseURL_/.well-known/pathofbuilding this endpoint should provide information about the API and the version of the API.
Furthermore this may allow having custom endpoints for the API.

<details><summary><b>Specification</b></summary>
| Feature | Field | Type | Description |
| ---------------- | ------------- | ---------------- | ------------------------------------------------------------------------------------ |
| League Filtering | league_filter | bool | This can be used to indicate whether the API supports filtering based on leagues |
| Gem Filtering | gem_filter | bool | This can be used to indicate whether the API supports filtering based on gems |
| Streams | streams | StreamInfo[] | A list of streams available to be queried against |
| Update Builds | update_builds | UpdateBuildsInfo | Indicates if the API supports updating builds via PoB and which fields are supported |

</details>

### Types

#### StreamInfo
<details><summary><b>StreamInfo</b></summary>

| Field | Type | Description |
| ------- | ------ | ------------------------------- |
| name | string | Name of the stream |
| apiPath | string | API path to the stream endpoint |

apiPath might be changed to a generic endpoint such as `/v1/{stream}/builds`
</details>

#### UpdateBuildsInfo

<details><summary><b>UpdateBuildsInfo</b></summary>
| Field | Type | Description |
| ---------- | -------- | ------------------------------------------------------ |
| hasSupport | bool | indicates if the API supports updating external builds |
Expand All @@ -42,18 +45,21 @@ Example:
"fields": ["description", "youtubeUrl"]
}
```
</details>

## Version 1

### Response and Request types

#### BuildInfo
<details><summary><b>BuildInfo</b></summary>

| Field | Type | Description |
| ------------ | ------- | ----------------------------------- |
| pobdata | string | The Path of Building data |
| name | string | The name of the build |
| lastModified | integer | The last modification timestamp |
| buildId | string | The unique identifier for the build |
</details>

### Endpoints

Expand Down

0 comments on commit bc5536a

Please sign in to comment.