@@ -9,11 +9,12 @@ The base URL for an API should be: _baseURL_/_apiVersion_/ meaning even somethin
9
9
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.
10
10
Furthermore this may allow having custom endpoints for the API.
11
11
12
- | Feature | Field | Type | Description |
13
- | ---------------- | ------------- | ------------ | --------------------------------------------------------------------------------- |
14
- | League Filtering | league_filter | bool | This can be used to indicate whether the API supports filtering based on leagues |
15
- | Gem Filtering | gem_filter | bool | This can be used to indicate whether the API supports filtering based on gems |
16
- | Streams | streams | StreamInfo[ ] | A list of streams available to be queried against |
12
+ | Feature | Field | Type | Description |
13
+ | ---------------- | ------------- | ---------------- | ------------------------------------------------------------------------------------ |
14
+ | League Filtering | league_filter | bool | This can be used to indicate whether the API supports filtering based on leagues |
15
+ | Gem Filtering | gem_filter | bool | This can be used to indicate whether the API supports filtering based on gems |
16
+ | Streams | streams | StreamInfo[ ] | A list of streams available to be queried against |
17
+ | Update Builds | update_builds | UpdateBuildsInfo | Indicates if the API supports updating builds via PoB and which fields are supported |
17
18
18
19
### Types
19
20
@@ -26,6 +27,21 @@ Furthermore this may allow having custom endpoints for the API.
26
27
27
28
apiPath might be changed to a generic endpoint such as ` /v1/{stream}/builds `
28
29
30
+ #### UpdateBuildsInfo
31
+
32
+ | Field | Type | Description |
33
+ | ---------- | -------- | ------------------------------------------------------ |
34
+ | hasSupport | bool | indicates if the API supports updating external builds |
35
+ | fields | string[ ] | list of fields that can be updated |
36
+
37
+ Example:
38
+
39
+ ``` json
40
+ {
41
+ "hasSupport" : true ,
42
+ "fields" : [" description" , " youtubeUrl" ]
43
+ }
44
+ ```
29
45
## Version 1
30
46
31
47
### Response and Request types
@@ -42,7 +58,7 @@ apiPath might be changed to a generic endpoint such as `/v1/{stream}/builds`
42
58
### Endpoints
43
59
44
60
<details >
45
- <summary ><code >GET</code > <code ><b >/v1/{stream}/ builds</b ></code > <code >(Lists multiple builds)</code ></summary >
61
+ <summary ><code >GET</code > <code ><b >/v1/builds</b ></code > <code >(Lists multiple builds)</code ></summary >
46
62
47
63
#### Parameters
48
64
> Query Parameters
@@ -77,3 +93,36 @@ Example values:
77
93
78
94
</details >
79
95
96
+
97
+ <details >
98
+ <summary ><code >POST</code > <code ><b >/v1/builds/{buildId}</b ></code > <code >(Update a single build on the source)</code ></summary >
99
+
100
+ #### Parameters
101
+ > Path Parameters
102
+
103
+ | name | type | data type | description |
104
+ | ------- | -------- | --------- | ---------------------------------------------------------- |
105
+ | buildId | required | string | The build in question on the source that should be updated |
106
+
107
+ #### Request
108
+
109
+ | Field | Type | Description |
110
+ | ---------- | -------- | ---------------------------------- |
111
+ | pobdata | string | The Path of Building data |
112
+ | name | string | The name of the build |
113
+ | customData | string[ ] | A list of custom data to be stored |
114
+
115
+ customData will be describable fields via the metadata endpoint, if customData is empty it is expected to be ignored and no changes should be made.
116
+
117
+ #### Responses
118
+
119
+ | http code | content-type | response | Description |
120
+ | --------- | -------------------------- | --------------------- | ---------------------- |
121
+ | ` 200 ` | ` application/json ` | None | Update succesful |
122
+ | ` 201 ` | ` application/json ` | None | Succesful creation |
123
+ | ` 400 ` | ` text/html; charset=utf-8 ` | ` Reason for failure ` | Input may be incorrect |
124
+ | ` 401 ` | ` text/html; charset=utf-8 ` | ` Reason if necessary ` | Auth incorrect |
125
+ | ` 404 ` | ` text/html; charset=utf-8 ` | None | Build does not exist |
126
+
127
+ </details >
128
+
0 commit comments