Skip to content

Commit c7d567e

Browse files
authored
Merge pull request #179 from icpc/add-subdivisions
Add country subdivisions to organizations
2 parents bc84004 + 9e07822 commit c7d567e

File tree

2 files changed

+21
-14
lines changed

2 files changed

+21
-14
lines changed

Contest_API.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,19 +1247,21 @@ organizations (i.e. return any organization\_ids).
12471247

12481248
Properties of organization objects:
12491249

1250-
| Name | Type | Description
1251-
| :----------------- | :-------------- | :----------
1252-
| id | ID | Identifier of the organization.
1253-
| icpc\_id | string ? | External identifier from ICPC CMS.
1254-
| name | string | Short display name of the organization.
1255-
| formal\_name | string ? | Full organization name if too long for normal display purposes.
1256-
| country | string ? | [ISO 3166-1 alpha-3 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) of the organization's country.
1257-
| country\_flag | array of FILE ? | Flag of the country. A server is recommended to provide flags of size around 56x56 and 160x160. Only allowed mime types are image/\*.
1258-
| url | string ? | URL to organization's website.
1259-
| twitter\_hashtag | string ? | Organization Twitter hashtag.
1260-
| twitter\_account | string ? | Organization Twitter account.
1261-
| location | LOCATION ? | Location where this organization is based.
1262-
| logo | array of FILE ? | Logo of the organization. A server must provide logos of size 56x56 and 160x160 but may provide other sizes as well. Only allowed mime types are image/\*.
1250+
| Name | Type | Description
1251+
| :------------------------- | :-------------- | :----------
1252+
| id | ID | Identifier of the organization.
1253+
| icpc\_id | string ? | External identifier from ICPC CMS.
1254+
| name | string | Short display name of the organization.
1255+
| formal\_name | string ? | Full organization name if too long for normal display purposes.
1256+
| country | string ? | [ISO 3166-1 alpha-3 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) of the organization's country.
1257+
| country\_flag | array of FILE ? | Flag of the country. A server is recommended to provide flags of size around 56x56 and 160x160. Only allowed mime types are image/\*.
1258+
| country\_subdivision | string ? | [ISO 3166-2 code](https://en.wikipedia.org/wiki/ISO_3166-2) of the organization's country subdivision (e.g. province or state).
1259+
| country\_subdivision\_flag | array of FILE ? | Flag of the country subdivision. A server is recommended to provide flags of size around 56x56 and 160x160. Only allowed mime types are image/\*.
1260+
| url | string ? | URL to organization's website.
1261+
| twitter\_hashtag | string ? | Organization Twitter hashtag.
1262+
| twitter\_account | string ? | Organization Twitter account.
1263+
| location | LOCATION ? | Location where this organization is based.
1264+
| logo | array of FILE ? | Logo of the organization. A server must provide logos of size 56x56 and 160x160 but may provide other sizes as well. Only allowed mime types are image/\*.
12631265

12641266
#### Examples
12651267

@@ -1271,7 +1273,11 @@ Returned data:
12711273

12721274
```json
12731275
[{"id":"inst123","icpc_id":"433","name":"Shanghai Jiao Tong U.","formal_name":"Shanghai Jiao Tong University"},
1274-
{"id":"inst105","name":"Carnegie Mellon University","country":"USA",
1276+
{"id":"inst105","name":"Carnegie Mellon University","country":"USA","country_subdivision":"US-PA",
1277+
"country_flag":[{"href":"http://example.com/api/contests/wf14/flags/USA/56px","filename":"56px.png","mime":"image/png","width":56,"height":56},
1278+
{"href":"http://example.com/api/contests/wf14/flags/USA/160px","filename":"160px.png","mime":"image/png","width":160,"height":160}],
1279+
"country_subdivision_flag":[{"href":"http://example.com/api/contests/wf14/flags/US-PA/56px","filename":"56px.png","mime":"image/png","width":56,"height":56},
1280+
{"href":"http://example.com/api/contests/wf14/flags/US-PA/160px","filename":"160px.png","mime":"image/png","width":160,"height":160}],
12751281
"logo":[{"href":"http://example.com/api/contests/wf14/organizations/inst105/logo/56px","filename":"56px.png","mime":"image/png","width":56,"height":56},
12761282
{"href":"http://example.com/api/contests/wf14/organizations/inst105/logo/160px","filename":"160px.png","mime":"image/png","width":160,"height":160}]
12771283
}

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ These are the main changes made since the `2023-06` version:
3030

3131
- Changed type of `penalty_time` in contest enpoint from `integer` to `RELTIME`.
3232
- Changed type of time related properties in scoreboard endpoint from `integer` to `RELTIME`.
33+
- Added `country_subdivision` and `country_subdivision_flag` to organizations endpoint.
3334

3435
## References
3536

0 commit comments

Comments
 (0)