Endpoint | Description |
---|---|
GET /v1/types/effects | Gets a list of type effects |
GET /v1/types/effects/:type_effect_id | Gets a type effect |
POST /v1/types/effects/:type_effect_id | Updates a type effect |
Gets a list of type effects
Header:
GET /v1/types/effects
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Body:
None
Name | Type | Description |
---|---|---|
data
|
array | |
data[]
|
object | |
data[].id
|
string |
Type effect ID. (identical to :type_effect_id )
|
data[].type
|
string | Type of resource. Must be "type_effects". |
data[].attributes
|
object | |
data[].attributes.attacking_type
|
object | Attacking type. |
data[].attributes.attacking_type.id
|
string | Type ID. |
data[].attributes.attacking_type.type
|
string | Type of resource. Must be "type_names". |
data[].attributes.attacking_type.attributes
|
object | |
data[].attributes.attacking_type.attributes.name
|
string | Type name. |
data[].attributes.attacking_type.links
|
object | |
data[].attributes.attacking_type.links.self
|
string | Link to type resource. |
data[].attributes.defending_type
|
object | Defending type. |
data[].attributes.defending_type.id
|
string | Type ID. |
data[].attributes.defending_type.type
|
string | Type of resource. Must be "type_names". |
data[].attributes.defending_type.attributes
|
object | |
data[].attributes.defending_type.attributes.name
|
string | Type name. |
data[].attributes.defending_type.links
|
object | |
data[].attributes.defending_type.links.self
|
string | Link to type resource. |
data[].attributes.multiplier
|
number | Damage multiplier. |
data[].links
|
object | |
data[].links.self
|
string | Link to current resource. |
links
|
object | |
links.self
|
string | Link to list resource. |
Headers:
HTTP/1.1 200 OK
Content-Type: application/json
Server: pkmnapi/0.1.0
Body:
{
"data": [
{
"id": "0",
"type": "type_effects",
"attributes": {
"attacking_type": {
"id": "21",
"type": "type_names",
"attributes": {
"name": "WATER"
},
"links": {
"self": "https://api.pkmnapi.com/v1/types/names/21"
}
},
"defending_type": {
"id": "20",
"type": "type_names",
"attributes": {
"name": "FIRE"
},
"links": {
"self": "https://api.pkmnapi.com/v1/types/names/20"
}
},
"multiplier": 2
},
"links": {
"self": "https://api.pkmnapi.com/v1/types/effects/0"
}
},
...
],
"links": {
"self": "https://api.pkmnapi.com/v1/types/effects"
}
}
Gets a type effect
Location | Name | Type | Required? | Description |
---|---|---|---|---|
url |
:type_effect_id
|
string | ✔️ | Type effect ID. |
Header:
GET /v1/types/effects/0
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Body:
None
Name | Type | Description |
---|---|---|
data
|
object | |
data.id
|
string |
Type effect ID. (identical to :type_effect_id )
|
data.type
|
string | Type of resource. Must be "type_effects". |
data.attributes
|
object | |
data.attributes.attacking_type
|
object | Attacking type. |
data.attributes.attacking_type.id
|
string | Type ID. |
data.attributes.attacking_type.type
|
string | Type of resource. Must be "type_names". |
data.attributes.attacking_type.attributes
|
object | |
data.attributes.attacking_type.attributes.name
|
string | Type name. |
data.attributes.attacking_type.links
|
object | |
data.attributes.attacking_type.links.self
|
string | Link to type resource. |
data.attributes.defending_type
|
object | Defending type. |
data.attributes.defending_type.id
|
string | Type ID. |
data.attributes.defending_type.type
|
string | Type of resource. Must be "type_names". |
data.attributes.defending_type.attributes
|
object | |
data.attributes.defending_type.attributes.name
|
string | Type name. |
data.attributes.defending_type.links
|
object | |
data.attributes.defending_type.links.self
|
string | Link to type resource. |
data.attributes.multiplier
|
number | Damage multiplier. |
data.links
|
object | |
data.links.self
|
string | Link to current resource. |
links
|
object | |
links.self
|
string | Link to current resource. |
Headers:
HTTP/1.1 200 OK
Content-Type: application/json
Server: pkmnapi/0.1.0
Body:
{
"data": {
"id": "0",
"type": "type_effects",
"attributes": {
"attacking_type": {
"id": "21",
"type": "type_names",
"attributes": {
"name": "WATER"
},
"links": {
"self": "https://api.pkmnapi.com/v1/types/names/21"
}
},
"defending_type": {
"id": "20",
"type": "type_names",
"attributes": {
"name": "FIRE"
},
"links": {
"self": "https://api.pkmnapi.com/v1/types/names/20"
}
},
"multiplier": 2
},
"links": {
"self": "https://api.pkmnapi.com/v1/types/effects/0"
}
},
"links": {
"self": "https://api.pkmnapi.com/v1/types/effects/0"
}
}
Updates a type effect
Location | Name | Type | Required? | Description |
---|---|---|---|---|
url |
:type_effect_id
|
string | ✔️ | Type effect ID. |
header |
X-Patch-Description
|
string | Description of change. | |
body |
data
|
object | ✔️ | |
body |
data.type
|
string | ✔️ | Type of data. Must be "type_effects". |
body |
data.attributes
|
object | ✔️ | |
body |
data.attributes.attacking_type
|
object | ✔️ | Attacking type. |
body |
data.attributes.attacking_type.id
|
string | ✔️ | Type ID. |
body |
data.attributes.defending_type
|
object | ✔️ | Defending type. |
body |
data.attributes.defending_type.id
|
string | ✔️ | Type ID. |
body |
data.attributes.multiplier
|
number | ✔️ | Damage multiplier. |
Header:
POST /v1/types/effects/0
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Content-Type: application/json
X-Patch-Description: Update WATER vs. FIRE type effect
Body:
{
"data": {
"type": "type_effects",
"attributes": {
"attacking_type": {
"id": "21"
},
"defending_type": {
"id": "20"
},
"multiplier": 0.0
}
}
}
Headers:
HTTP/1.1 202 Accepted
Content-Type: application/json
Server: pkmnapi/0.1.0
Body:
{}