{"_id":"570423c5ecfca80e00998fa3","category":"56e857b6c59c4a0e00d5d052","user":"56548c568975c70d002ea4b4","body":"","hidden":false,"isReference":true,"link_external":false,"title":"Sports","type":"basic","project":"5641217e0ee5370d00da636d","sync_unique":"","api":{"params":[],"results":{"codes":[]},"settings":"","url":"","auth":"required"},"createdAt":"2016-04-05T20:44:53.458Z","githubsync":"","link_url":"","order":0,"updates":[],"version":"56cca51eca43550b002813fa","__v":4,"excerpt":"Various settings are Sport-dependent, for example not all sports will have a `Line Judge` [Official Type](https://sportnginv2.readme.io/docs/official-types-show).\n\n###Associations\n[Official Types](https://sportnginv2.readme.io/docs/official-types-show) are Sport-specific, and Site(s) are associated with one or more Sports. Each League is Sport-specific.","parentDoc":null,"slug":"sports","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
Sports
{"_id":"56f41aa50f1f970e006e24b0","hidden":false,"slug":"sports-index","title":"Sports Index","updates":[],"user":"56e71f9edee212320019e731","category":"56e857b6c59c4a0e00d5d052","githubsync":"","order":1,"parentDoc":null,"project":"5641217e0ee5370d00da636d","body":"###Attributes\n[block:parameters]\n{\n \"data\": {\n \"0-0\": \"id\",\n \"1-0\": \"name\",\n \"0-1\": \"Integer\",\n \"1-1\": \"String\",\n \"1-2\": \"Sport name\",\n \"0-2\": \"Sport id assigned by NGIN\",\n \"h-0\": \"Attribute\",\n \"h-1\": \"Type\",\n \"h-2\": \"Notes\"\n },\n \"cols\": 3,\n \"rows\": 2\n}\n[/block]","api":{"params":[],"results":{"codes":[{"code":"[\n {\n \"id\": 1,\n \"name\": \"Ice Hockey\",\n \"updated_on\": \"2011-11-17T04:49:23-08:00\",\n \"created_on\": \"2006-11-29T00:58:07-08:00\",\n \"class_name\": \"IceHockey\",\n \"stat_enabled\": true,\n \"tabular_scoring_plays\": true\n },\n {\n \"id\": 3,\n \"name\": \"Lacrosse\",\n \"updated_on\": \"2011-12-18T16:24:56-08:00\",\n \"created_on\": \"2006-12-07T18:22:25-08:00\",\n \"class_name\": \"Lacrosse\",\n \"stat_enabled\": true,\n \"tabular_scoring_plays\": true\n },\n {\n \"id\": 4,\n \"name\": \"Baseball/Softball\",\n \"updated_on\": \"2012-03-23T01:32:25-07:00\",\n \"created_on\": \"2006-12-07T18:22:38-08:00\",\n \"class_name\": \"Baseball\",\n \"stat_enabled\": true,\n \"tabular_scoring_plays\": false\n },\n {\n \"id\": 5,\n \"name\": \"Soccer\",\n \"updated_on\": \"2012-07-17T22:43:03-07:00\",\n \"created_on\": \"2006-12-07T18:22:54-08:00\",\n \"class_name\": \"Soccer\",\n \"stat_enabled\": true,\n \"tabular_scoring_plays\": true\n },\n {\n \"id\": 6,\n \"name\": \"Cycling\",\n \"updated_on\": \"2006-12-15T17:06:35-08:00\",\n \"created_on\": \"2006-12-15T17:06:35-08:00\",\n \"class_name\": \"Cycling\",\n \"stat_enabled\": null,\n \"tabular_scoring_plays\": false\n },\n {\n \"id\": 7,\n \"name\": \"Basketball\",\n \"updated_on\": \"2012-07-03T22:22:09-07:00\",\n \"created_on\": \"2006-12-20T15:11:13-08:00\",\n \"class_name\": \"Basketball\",\n \"stat_enabled\": true,\n \"tabular_scoring_plays\": false\n },\n {\n \"id\": 9,\n \"name\": \"Track and Field\",\n \"updated_on\": \"2006-12-28T12:32:21-08:00\",\n \"created_on\": \"2006-12-28T12:32:21-08:00\",\n \"class_name\": \"TrackAndField\",\n \"stat_enabled\": null,\n \"tabular_scoring_plays\": false\n },\n {\n \"id\": 10,\n \"name\": \"Tennis\",\n \"updated_on\": \"2007-01-25T16:20:28-08:00\",\n \"created_on\": \"2007-01-25T16:20:28-08:00\",\n \"class_name\": \"Tennis\",\n \"stat_enabled\": null,\n \"tabular_scoring_plays\": false\n },\n {\n \"id\": 11,\n \"name\": \"Football\",\n \"updated_on\": \"2011-08-03T22:00:45-07:00\",\n \"created_on\": \"2007-04-04T16:41:25-07:00\",\n \"class_name\": \"Football\",\n \"stat_enabled\": true,\n \"tabular_scoring_plays\": true\n },\n {\n \"id\": 12,\n \"name\": \"Volleyball\",\n \"updated_on\": \"2011-08-18T13:25:07-07:00\",\n \"created_on\": \"2007-10-12T11:34:32-07:00\",\n \"class_name\": \"Volleyball\",\n \"stat_enabled\": true,\n \"tabular_scoring_plays\": false\n },\n {\n \"id\": 13,\n \"name\": \"Wrestling\",\n \"updated_on\": \"2008-01-08T12:52:23-08:00\",\n \"created_on\": \"2008-01-08T12:52:23-08:00\",\n \"class_name\": \"Wrestling\",\n \"stat_enabled\": false,\n \"tabular_scoring_plays\": false\n },\n {\n \"id\": 16,\n \"name\": \"Rugby Union\",\n \"updated_on\": \"2010-03-02T06:40:46-08:00\",\n \"created_on\": \"2010-03-02T06:40:46-08:00\",\n \"class_name\": \"RugbyUnion\",\n \"stat_enabled\": true,\n \"tabular_scoring_plays\": false\n },\n {\n \"id\": 18,\n \"name\": \"Golf\",\n \"updated_on\": \"2011-03-15T07:12:07-07:00\",\n \"created_on\": \"2011-03-15T07:12:07-07:00\",\n \"class_name\": \"Golf\",\n \"stat_enabled\": false,\n \"tabular_scoring_plays\": false\n },\n {\n \"id\": 20,\n \"name\": \"Paintball\",\n \"updated_on\": \"2012-04-28T16:57:19-07:00\",\n \"created_on\": \"2012-04-28T16:57:19-07:00\",\n \"class_name\": \"Paintball\",\n \"stat_enabled\": false,\n \"tabular_scoring_plays\": false\n },\n {\n \"id\": 21,\n \"name\": \"Cross Country\",\n \"updated_on\": \"2012-05-11T08:01:00-07:00\",\n \"created_on\": \"2012-05-11T08:01:00-07:00\",\n \"class_name\": \"CrossCountry\",\n \"stat_enabled\": false,\n \"tabular_scoring_plays\": false\n },\n {\n \"id\": 22,\n \"name\": \"Swimming\",\n \"updated_on\": \"2012-05-11T08:01:16-07:00\",\n \"created_on\": \"2012-05-11T08:01:16-07:00\",\n \"class_name\": \"Swimming\",\n \"stat_enabled\": false,\n \"tabular_scoring_plays\": false\n },\n {\n \"id\": 23,\n \"name\": \"Skiing\",\n \"updated_on\": \"2012-05-23T12:21:27-07:00\",\n \"created_on\": \"2012-05-23T12:21:27-07:00\",\n \"class_name\": \"Skiing\",\n \"stat_enabled\": false,\n \"tabular_scoring_plays\": false\n },\n {\n \"id\": 24,\n \"name\": \"Basic\",\n \"updated_on\": \"2012-08-14T13:08:29-07:00\",\n \"created_on\": \"2012-08-14T13:08:29-07:00\",\n \"class_name\": \"Basic\",\n \"stat_enabled\": true,\n \"tabular_scoring_plays\": false\n },\n {\n \"id\": 25,\n \"name\": \"Rugby wheel chair\",\n \"updated_on\": \"2013-01-22T10:59:44-08:00\",\n \"created_on\": \"2013-01-22T10:59:44-08:00\",\n \"class_name\": \"Wheelchair\",\n \"stat_enabled\": false,\n \"tabular_scoring_plays\": false\n },\n {\n \"id\": 26,\n \"name\": \"Canadian Football\",\n \"updated_on\": \"2014-06-27T10:15:32-07:00\",\n \"created_on\": \"2014-06-27T10:15:32-07:00\",\n \"class_name\": \"CanadianFootball\",\n \"stat_enabled\": true,\n \"tabular_scoring_plays\": true\n },\n {\n \"id\": 27,\n \"name\": \"Other\",\n \"updated_on\": \"2015-08-19T19:41:54-07:00\",\n \"created_on\": \"2015-08-19T19:41:54-07:00\",\n \"class_name\": \"\",\n \"stat_enabled\": false,\n \"tabular_scoring_plays\": false\n },\n {\n \"id\": 28,\n \"name\": \"Water Polo\",\n \"updated_on\": \"2015-10-22T13:41:01-07:00\",\n \"created_on\": \"2015-10-22T13:41:01-07:00\",\n \"class_name\": \"\",\n \"stat_enabled\": false,\n \"tabular_scoring_plays\": false\n }\n]","name":"","status":200,"language":"json"}]},"settings":"","url":"/sports","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/sports\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/sports\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/sports\")\n .get()\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get"},"createdAt":"2016-03-24T16:49:41.469Z","excerpt":"The Index method returns an array of available Sports.","isReference":true,"__v":7,"link_url":"","sync_unique":"","type":"get","version":"56cca51eca43550b002813fa","link_external":false,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getSports Index
Definition
Examples
curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/sports"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/sports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.sportngin.com/sports")
.get()
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.build();
Response response = client.newCall(request).execute();
Result Format
[
{
"id": 1,
"name": "Ice Hockey",
"updated_on": "2011-11-17T04:49:23-08:00",
"created_on": "2006-11-29T00:58:07-08:00",
"class_name": "IceHockey",
"stat_enabled": true,
"tabular_scoring_plays": true
},
{
"id": 3,
"name": "Lacrosse",
"updated_on": "2011-12-18T16:24:56-08:00",
"created_on": "2006-12-07T18:22:25-08:00",
"class_name": "Lacrosse",
"stat_enabled": true,
"tabular_scoring_plays": true
},
{
"id": 4,
"name": "Baseball/Softball",
"updated_on": "2012-03-23T01:32:25-07:00",
"created_on": "2006-12-07T18:22:38-08:00",
"class_name": "Baseball",
"stat_enabled": true,
"tabular_scoring_plays": false
},
{
"id": 5,
"name": "Soccer",
"updated_on": "2012-07-17T22:43:03-07:00",
"created_on": "2006-12-07T18:22:54-08:00",
"class_name": "Soccer",
"stat_enabled": true,
"tabular_scoring_plays": true
},
{
"id": 6,
"name": "Cycling",
"updated_on": "2006-12-15T17:06:35-08:00",
"created_on": "2006-12-15T17:06:35-08:00",
"class_name": "Cycling",
"stat_enabled": null,
"tabular_scoring_plays": false
},
{
"id": 7,
"name": "Basketball",
"updated_on": "2012-07-03T22:22:09-07:00",
"created_on": "2006-12-20T15:11:13-08:00",
"class_name": "Basketball",
"stat_enabled": true,
"tabular_scoring_plays": false
},
{
"id": 9,
"name": "Track and Field",
"updated_on": "2006-12-28T12:32:21-08:00",
"created_on": "2006-12-28T12:32:21-08:00",
"class_name": "TrackAndField",
"stat_enabled": null,
"tabular_scoring_plays": false
},
{
"id": 10,
"name": "Tennis",
"updated_on": "2007-01-25T16:20:28-08:00",
"created_on": "2007-01-25T16:20:28-08:00",
"class_name": "Tennis",
"stat_enabled": null,
"tabular_scoring_plays": false
},
{
"id": 11,
"name": "Football",
"updated_on": "2011-08-03T22:00:45-07:00",
"created_on": "2007-04-04T16:41:25-07:00",
"class_name": "Football",
"stat_enabled": true,
"tabular_scoring_plays": true
},
{
"id": 12,
"name": "Volleyball",
"updated_on": "2011-08-18T13:25:07-07:00",
"created_on": "2007-10-12T11:34:32-07:00",
"class_name": "Volleyball",
"stat_enabled": true,
"tabular_scoring_plays": false
},
{
"id": 13,
"name": "Wrestling",
"updated_on": "2008-01-08T12:52:23-08:00",
"created_on": "2008-01-08T12:52:23-08:00",
"class_name": "Wrestling",
"stat_enabled": false,
"tabular_scoring_plays": false
},
{
"id": 16,
"name": "Rugby Union",
"updated_on": "2010-03-02T06:40:46-08:00",
"created_on": "2010-03-02T06:40:46-08:00",
"class_name": "RugbyUnion",
"stat_enabled": true,
"tabular_scoring_plays": false
},
{
"id": 18,
"name": "Golf",
"updated_on": "2011-03-15T07:12:07-07:00",
"created_on": "2011-03-15T07:12:07-07:00",
"class_name": "Golf",
"stat_enabled": false,
"tabular_scoring_plays": false
},
{
"id": 20,
"name": "Paintball",
"updated_on": "2012-04-28T16:57:19-07:00",
"created_on": "2012-04-28T16:57:19-07:00",
"class_name": "Paintball",
"stat_enabled": false,
"tabular_scoring_plays": false
},
{
"id": 21,
"name": "Cross Country",
"updated_on": "2012-05-11T08:01:00-07:00",
"created_on": "2012-05-11T08:01:00-07:00",
"class_name": "CrossCountry",
"stat_enabled": false,
"tabular_scoring_plays": false
},
{
"id": 22,
"name": "Swimming",
"updated_on": "2012-05-11T08:01:16-07:00",
"created_on": "2012-05-11T08:01:16-07:00",
"class_name": "Swimming",
"stat_enabled": false,
"tabular_scoring_plays": false
},
{
"id": 23,
"name": "Skiing",
"updated_on": "2012-05-23T12:21:27-07:00",
"created_on": "2012-05-23T12:21:27-07:00",
"class_name": "Skiing",
"stat_enabled": false,
"tabular_scoring_plays": false
},
{
"id": 24,
"name": "Basic",
"updated_on": "2012-08-14T13:08:29-07:00",
"created_on": "2012-08-14T13:08:29-07:00",
"class_name": "Basic",
"stat_enabled": true,
"tabular_scoring_plays": false
},
{
"id": 25,
"name": "Rugby wheel chair",
"updated_on": "2013-01-22T10:59:44-08:00",
"created_on": "2013-01-22T10:59:44-08:00",
"class_name": "Wheelchair",
"stat_enabled": false,
"tabular_scoring_plays": false
},
{
"id": 26,
"name": "Canadian Football",
"updated_on": "2014-06-27T10:15:32-07:00",
"created_on": "2014-06-27T10:15:32-07:00",
"class_name": "CanadianFootball",
"stat_enabled": true,
"tabular_scoring_plays": true
},
{
"id": 27,
"name": "Other",
"updated_on": "2015-08-19T19:41:54-07:00",
"created_on": "2015-08-19T19:41:54-07:00",
"class_name": "",
"stat_enabled": false,
"tabular_scoring_plays": false
},
{
"id": 28,
"name": "Water Polo",
"updated_on": "2015-10-22T13:41:01-07:00",
"created_on": "2015-10-22T13:41:01-07:00",
"class_name": "",
"stat_enabled": false,
"tabular_scoring_plays": false
}
]
{"_id":"57110c3f999cb92b00a1fa88","__v":0,"excerpt":"The Show method returns a single Sport for a given `id`.\n\n###Parameters","isReference":true,"type":"get","body":"###Attributes\n[block:parameters]\n{\n \"data\": {\n \"0-0\": \"id\",\n \"1-0\": \"name\",\n \"0-1\": \"Integer\",\n \"1-1\": \"String\",\n \"1-2\": \"Sport name\",\n \"0-2\": \"Sport id assigned by NGIN\",\n \"h-0\": \"Attribute\",\n \"h-1\": \"Type\",\n \"h-2\": \"Notes\"\n },\n \"cols\": 3,\n \"rows\": 2\n}\n[/block]","category":"56e857b6c59c4a0e00d5d052","link_external":false,"parentDoc":null,"slug":"sports-show","updates":[],"version":"56cca51eca43550b002813fa","api":{"examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/sports/1\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/sports/1\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/sports/1\")\n .get()\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"_id":"57110c3f999cb92b00a1fa89","default":"","desc":"Id of the sport to display","name":"id","ref":"","required":true,"type":"int","in":"path"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n \"id\": 1,\n \"name\": \"Ice Hockey\",\n \"updated_on\": \"2011-11-17T04:49:23-08:00\",\n \"created_on\": \"2006-11-29T00:58:07-08:00\",\n \"class_name\": \"IceHockey\",\n \"stat_enabled\": true,\n \"tabular_scoring_plays\": true\n}","name":""}]},"settings":"","url":"/sports/:id","auth":"required"},"createdAt":"2016-04-15T15:43:59.246Z","editedParams":true,"title":"Sports Show","user":"56548c568975c70d002ea4b4","sync_unique":"","editedParams2":true,"githubsync":"","hidden":false,"link_url":"","order":2,"project":"5641217e0ee5370d00da636d","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getSports Show
Definition
Examples
curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/sports/1"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/sports/1")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.sportngin.com/sports/1")
.get()
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.build();
Response response = client.newCall(request).execute();
Result Format
{
"id": 1,
"name": "Ice Hockey",
"updated_on": "2011-11-17T04:49:23-08:00",
"created_on": "2006-11-29T00:58:07-08:00",
"class_name": "IceHockey",
"stat_enabled": true,
"tabular_scoring_plays": true
}
{"_id":"57014b649433720e00080da2","title":"Officials","user":"56cbf1419f4ae20b00644fde","version":"56cca51eca43550b002813fa","api":{"settings":"","url":"","auth":"required","params":[],"results":{"codes":[{"code":"{}","name":"","status":200,"language":"json"},{"name":"","status":400,"language":"json","code":"{}"}]}},"hidden":false,"link_external":false,"order":3,"slug":"officials","project":"5641217e0ee5370d00da636d","type":"basic","body":"","githubsync":"","isReference":true,"link_url":"","updates":[],"sync_unique":"","__v":9,"category":"56e857b6c59c4a0e00d5d052","createdAt":"2016-04-03T16:57:08.662Z","excerpt":"Officials are the referees for a particular [Game](https://sportnginv2.readme.io/docs/games-show).\n\n###Associations\nA Official belongs to a [Game](https://sportnginv2.readme.io/docs/games-show) and is classified by [Official Types](https://sportnginv2.readme.io/docs/official-types-show). [Official Type](https://sportnginv2.readme.io/docs/official-types-show) is germane to a given [Sports](https://sportnginv2.readme.io/docs/sports).","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
Officials
{"_id":"56f1a788da0c573400bacd0e","updates":[],"body":"###Attributes\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Attributes\",\n \"h-1\": \"Type\",\n \"0-0\": \"game_id\",\n \"0-1\": \"Integer\",\n \"1-0\": \"initial_state\",\n \"1-1\": \"Integer\"\n },\n \"cols\": 2,\n \"rows\": 2\n}\n[/block]","category":"56e857b6c59c4a0e00d5d052","excerpt":"The Index method returns an array of Officials matching the given parameters.\n\n###Parameters","isReference":true,"sync_unique":"","title":"Officials Index","version":"56cca51eca43550b002813fa","__v":0,"api":{"settings":"","url":"/officials","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/officials?game_id=13557134\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/officials?game_id=13557134\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/officials?game_id=13557134\")\n .get()\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"default":"","desc":"","name":"game_id","ref":"","required":true,"type":"int","in":"query","_id":"56f1a788da0c573400bacd0f"}],"results":{"codes":[{"status":200,"language":"json","code":"[\n {\n \"id\": 193702,\n \"name\": \"Joe the Ref\",\n \"official_type_id\": 1,\n \"game_id\": 13557134,\n \"created_at\": \"2016-04-08T11:53:36-07:00\",\n \"updated_at\": \"2016-04-08T11:53:36-07:00\"\n },\n {\n \"id\": 193703,\n \"name\": \"Jane the Ref\",\n \"official_type_id\": 1,\n \"game_id\": 13557134,\n \"created_at\": \"2016-04-08T12:26:27-07:00\",\n \"updated_at\": \"2016-04-08T12:26:27-07:00\"\n }\n]","name":""}]}},"githubsync":"","hidden":false,"link_url":"","project":"5641217e0ee5370d00da636d","createdAt":"2016-03-22T20:14:00.250Z","slug":"officials-index","type":"get","user":"56e71f9edee212320019e731","editedParams":true,"editedParams2":true,"link_external":false,"order":4,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getOfficials Index
Definition
Examples
curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/officials?game_id=13557134"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/officials?game_id=13557134")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.sportngin.com/officials?game_id=13557134")
.get()
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.build();
Response response = client.newCall(request).execute();
Result Format
[
{
"id": 193702,
"name": "Joe the Ref",
"official_type_id": 1,
"game_id": 13557134,
"created_at": "2016-04-08T11:53:36-07:00",
"updated_at": "2016-04-08T11:53:36-07:00"
},
{
"id": 193703,
"name": "Jane the Ref",
"official_type_id": 1,
"game_id": 13557134,
"created_at": "2016-04-08T12:26:27-07:00",
"updated_at": "2016-04-08T12:26:27-07:00"
}
]
{"_id":"56f1a8223eb62a34003ea01a","project":"5641217e0ee5370d00da636d","createdAt":"2016-03-22T20:16:34.087Z","order":5,"isReference":true,"link_external":false,"slug":"officials-create","version":"56cca51eca43550b002813fa","excerpt":"The Create method accepts a single Official (see attributes above) and creates a new record in SportsEngine.\n\n###Parameters","githubsync":"","hidden":false,"link_url":"","title":"Officials Create","type":"post","updates":[],"editedParams2":true,"body":"","category":"56e857b6c59c4a0e00d5d052","editedParams":true,"parentDoc":null,"sync_unique":"","user":"56e71f9edee212320019e731","__v":2,"api":{"params":[{"name":"name","in":"body","_id":"56f1a8223eb62a34003ea01b","ref":"","required":true,"desc":"Name of the official","default":"","type":"string"},{"desc":"ID of the game the official will be assigned to","default":"","type":"int","name":"game_id","in":"body","_id":"570806d8eec9610e003ebddd","ref":"","required":true},{"ref":"","required":false,"desc":"ID representing the type of official to be created","default":"","type":"int","name":"official_type_id","in":"body","_id":"570806d8eec9610e003ebdde"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n \"id\": 193703,\n \"name\": \"Jane the Ref\",\n \"official_type_id\": 1,\n \"game_id\": 13557134,\n \"created_at\": \"2016-04-08T12:26:27-07:00\",\n \"updated_at\": \"2016-04-08T12:26:27-07:00\"\n}","name":""}]},"settings":"","url":"/officials","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X POST -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n \"official\":{\n \"name\": \"Jane the Ref\",\n \"official_type_id\": 1,\n \"game_id\": 13557134\n }\n}' \"https://api.sportngin.com/officials\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/officials\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n \\\"official\\\":{\\n \\\"name\\\": \\\"Jane the Ref\\\",\\n \\\"official_type_id\\\": 1,\\n \\\"game_id\\\": 13557134\\n }\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n \\\"official\\\":{\\n \\\"name\\\": \\\"Jane the Ref\\\",\\n \\\"official_type_id\\\": 1,\\n \\\"game_id\\\": 13557134\\n }\\n}\");\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/officials\")\n .post(body)\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .addHeader(\"content-type\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();","language":"java"}]},"method":"post"},"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postOfficials Create
Body Params
Definition
Examples
curl -X POST -H "Authorization: Bearer ACCESS_TOKEN" -H "NGIN-API-VERSION: 0.1" -H "Content-Type: application/json" -d '{
"official":{
"name": "Jane the Ref",
"official_type_id": 1,
"game_id": 13557134
}
}' "https://api.sportngin.com/officials"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/officials")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["ngin-api-version"] = '0.1'
request["content-type"] = 'application/json'
request.body = "{\n \"official\":{\n \"name\": \"Jane the Ref\",\n \"official_type_id\": 1,\n \"game_id\": 13557134\n }\n}"
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"official\":{\n \"name\": \"Jane the Ref\",\n \"official_type_id\": 1,\n \"game_id\": 13557134\n }\n}");
Request request = new Request.Builder()
.url("https://api.sportngin.com/officials")
.post(body)
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("ngin-api-version", "0.1")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
Result Format
{
"id": 193703,
"name": "Jane the Ref",
"official_type_id": 1,
"game_id": 13557134,
"created_at": "2016-04-08T12:26:27-07:00",
"updated_at": "2016-04-08T12:26:27-07:00"
}
{"_id":"56f1a99161376720009412ab","isReference":true,"project":"5641217e0ee5370d00da636d","user":"56e71f9edee212320019e731","api":{"params":[{"type":"int","in":"body","_id":"56f1a99161376720009412ac","default":"","desc":"","name":"current_user","ref":"","required":true}],"results":{"codes":[{"language":"json","code":"{\n \"id\": 193705,\n \"name\": \"Jill the Ref\",\n \"official_type_id\": 1,\n \"game_id\": 13557134,\n \"created_at\": \"2016-04-08T13:33:40-07:00\",\n \"updated_at\": \"2016-04-08T13:33:40-07:00\"\n}","name":"","status":200}]},"settings":"","url":"/officials","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X POST -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Content-Type: application/json\" -H \"NGIN-API-VERSION: 0.1\" -d '{\n \"id\": \"193703\",\n \"official\":{\n \"name\": \"Jill the Ref\",\n \"official_type_id\": 1,\n \"game_id\": 13557134\n }\n}' \"https://api.sportngin.com/officials\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/officials\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest.body = \"{\\n \\\"id\\\": \\\"193703\\\",\\n \\\"official\\\":{\\n \\\"name\\\": \\\"Jill the Ref\\\",\\n \\\"official_type_id\\\": 1,\\n \\\"game_id\\\": 13557134\\n }\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n \\\"id\\\": \\\"193703\\\",\\n \\\"official\\\":{\\n \\\"name\\\": \\\"Jill the Ref\\\",\\n \\\"official_type_id\\\": 1,\\n \\\"game_id\\\": 13557134\\n }\\n}\");\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/officials\")\n .post(body)\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"post"},"category":"56e857b6c59c4a0e00d5d052","editedParams2":true,"hidden":false,"parentDoc":null,"sync_unique":"","title":"Officials Update","body":"","editedParams":true,"githubsync":"","order":6,"link_external":false,"link_url":"","slug":"officials-update","type":"post","__v":0,"createdAt":"2016-03-22T20:22:41.830Z","excerpt":"The Update method accepts a single Official (see attributes above) and updates the matching record in SportsEngine.\n\n###Parameters","updates":[],"version":"56cca51eca43550b002813fa","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postOfficials Update
Body Params
Definition
Examples
curl -X POST -H "Authorization: Bearer ACCESS_TOKEN" -H "Content-Type: application/json" -H "NGIN-API-VERSION: 0.1" -d '{
"id": "193703",
"official":{
"name": "Jill the Ref",
"official_type_id": 1,
"game_id": 13557134
}
}' "https://api.sportngin.com/officials"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/officials")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["content-type"] = 'application/json'
request["ngin-api-version"] = '0.1'
request.body = "{\n \"id\": \"193703\",\n \"official\":{\n \"name\": \"Jill the Ref\",\n \"official_type_id\": 1,\n \"game_id\": 13557134\n }\n}"
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"id\": \"193703\",\n \"official\":{\n \"name\": \"Jill the Ref\",\n \"official_type_id\": 1,\n \"game_id\": 13557134\n }\n}");
Request request = new Request.Builder()
.url("https://api.sportngin.com/officials")
.post(body)
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("content-type", "application/json")
.addHeader("ngin-api-version", "0.1")
.build();
Response response = client.newCall(request).execute();
Result Format
{
"id": 193705,
"name": "Jill the Ref",
"official_type_id": 1,
"game_id": 13557134,
"created_at": "2016-04-08T13:33:40-07:00",
"updated_at": "2016-04-08T13:33:40-07:00"
}
{"_id":"56f1a6184476fb2200795e5b","project":"5641217e0ee5370d00da636d","user":"56e71f9edee212320019e731","version":"56cca51eca43550b002813fa","editedParams":true,"editedParams2":true,"link_url":"","__v":4,"category":"56e857b6c59c4a0e00d5d052","createdAt":"2016-03-22T20:07:52.496Z","hidden":false,"title":"Official Types Show","type":"get","body":"###Attributes\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Attributes\",\n \"h-1\": \"Type\",\n \"h-2\": \"Notes\",\n \"0-0\": \"id\",\n \"0-1\": \"Integer\",\n \"0-2\": \"Unique id assign by NGIN\",\n \"1-0\": \"name\",\n \"1-1\": \"String\",\n \"1-2\": \"Name of the official type\",\n \"2-0\": \"sport_id\",\n \"2-1\": \"Integer\",\n \"2-2\": \"ID of the sport assigned by NGIN\",\n \"3-0\": \"created_at\",\n \"3-1\": \"Datetime\",\n \"3-2\": \"Timestamp of creation date\",\n \"4-0\": \"updated_at\",\n \"4-1\": \"Datetime\",\n \"4-2\": \"Timestamp of last update\"\n },\n \"cols\": 3,\n \"rows\": 5\n}\n[/block]","githubsync":"","isReference":true,"sync_unique":"","parentDoc":null,"slug":"official-types-show","updates":[],"api":{"examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/official_types/?sport_id=1\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/official_types/?sport_id=1\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/official_types/?sport_id=1\")\n .get()\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"type":"int","in":"query","_id":"56fd51fed393740e0080f29c","default":"","desc":"","name":"sport_id","ref":"","required":true}],"results":{"codes":[{"language":"json","code":"[\n {\n \"created_at\": \"2011-08-03T21:54:13-07:00\",\n \"id\": 1,\n \"name\": \"Official\",\n \"sport_id\": 1,\n \"updated_at\": \"2011-08-03T21:54:13-07:00\"\n },\n {\n \"created_at\": \"2011-08-03T21:54:13-07:00\",\n \"id\": 17,\n \"name\": \"Referee\",\n \"sport_id\": 1,\n \"updated_at\": \"2011-08-03T21:54:13-07:00\"\n },\n {\n \"created_at\": \"2011-08-03T21:54:13-07:00\",\n \"id\": 18,\n \"name\": \"Linesman\",\n \"sport_id\": 1,\n \"updated_at\": \"2011-08-03T21:54:13-07:00\"\n },\n {\n \"created_at\": \"2011-08-03T21:54:13-07:00\",\n \"id\": 19,\n \"name\": \"Assistant Referee\",\n \"sport_id\": 1,\n \"updated_at\": \"2011-08-03T21:54:13-07:00\"\n },\n {\n \"created_at\": \"2011-08-03T21:54:13-07:00\",\n \"id\": 34,\n \"name\": \"Other\",\n \"sport_id\": 1,\n \"updated_at\": \"2011-08-03T21:54:13-07:00\"\n },\n {\n \"created_at\": \"2012-10-05T12:23:54-07:00\",\n \"id\": 54,\n \"name\": \"Official Scorer\",\n \"sport_id\": 1,\n \"updated_at\": \"2012-10-05T12:23:54-07:00\"\n },\n {\n \"created_at\": \"2012-10-05T12:23:54-07:00\",\n \"id\": 55,\n \"name\": \"Score Keeper\",\n \"sport_id\": 1,\n \"updated_at\": \"2012-10-05T12:23:54-07:00\"\n }\n]","name":"","status":200}]},"settings":"","url":"/official_types","auth":"required"},"excerpt":"The Show method returns an array of Official Types for a given `sport_id`.\n\n###Parameters","link_external":false,"order":8,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getOfficial Types Show
Definition
Examples
curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/official_types/?sport_id=1"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/official_types/?sport_id=1")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.sportngin.com/official_types/?sport_id=1")
.get()
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.build();
Response response = client.newCall(request).execute();
Result Format
[
{
"created_at": "2011-08-03T21:54:13-07:00",
"id": 1,
"name": "Official",
"sport_id": 1,
"updated_at": "2011-08-03T21:54:13-07:00"
},
{
"created_at": "2011-08-03T21:54:13-07:00",
"id": 17,
"name": "Referee",
"sport_id": 1,
"updated_at": "2011-08-03T21:54:13-07:00"
},
{
"created_at": "2011-08-03T21:54:13-07:00",
"id": 18,
"name": "Linesman",
"sport_id": 1,
"updated_at": "2011-08-03T21:54:13-07:00"
},
{
"created_at": "2011-08-03T21:54:13-07:00",
"id": 19,
"name": "Assistant Referee",
"sport_id": 1,
"updated_at": "2011-08-03T21:54:13-07:00"
},
{
"created_at": "2011-08-03T21:54:13-07:00",
"id": 34,
"name": "Other",
"sport_id": 1,
"updated_at": "2011-08-03T21:54:13-07:00"
},
{
"created_at": "2012-10-05T12:23:54-07:00",
"id": 54,
"name": "Official Scorer",
"sport_id": 1,
"updated_at": "2012-10-05T12:23:54-07:00"
},
{
"created_at": "2012-10-05T12:23:54-07:00",
"id": 55,
"name": "Score Keeper",
"sport_id": 1,
"updated_at": "2012-10-05T12:23:54-07:00"
}
]
{"_id":"570142c5a565e20e00157415","order":0,"type":"basic","version":"56cca51eca43550b002813fa","isReference":true,"slug":"leagues","updates":[],"hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"name":"","status":400,"language":"json","code":"{}"}]},"settings":"","url":"","auth":"required","params":[]},"category":"56e03709f97d422900d63922","githubsync":"","link_external":false,"parentDoc":null,"sync_unique":"","__v":17,"body":"[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Hint\",\n \"body\": \"A [League Instance](ref:league-instances-index) can inform a [League Instance Tree](ref:league-instance-tree-show), which displays the structure of associated [League Instance](ref:league-instances-index) including dependent [Subseasons](ref:subseasons), [Division Instances Index](doc:division-instances-create), and [Team Instances](ref:team_instances-index).\"\n}\n[/block]","createdAt":"2016-04-03T16:20:21.433Z","excerpt":"A League represents an association of [Teams](https://sportnginv2.readme.io/docs/teams-show) on a [Site](https://sportnginsite.readme.io/docs/sites). A is an instance of a specific League, which represents a single [Season](https://sportnginv2.readme.io/docs/seasons-show).\n\nMuch like the League and the [League Instances](https://sportnginv2.readme.io/docs/league-instances-index), a [Team Instance](https://sportnginv2.readme.io/docs/team_instances-show) is an instance of a specific team, usually for a single [Season](https://sportnginv2.readme.io/docs/seasons-show) or [Subseason](https://sportnginv2.readme.io/docs/subseasons-show). A [Team Instance](https://sportnginv2.readme.io/docs/team_instances-show) belongs to a [Rosters Index](https://sportnginv2.readme.io/docs/rosters) or to a [Team](https://sportnginv2.readme.io/docs/teams-show). A [Team Instance](https://sportnginv2.readme.io/docs/team_instances-show) can have many [Photos](https://sportnginsite.readme.io/docs/photo), [Videos](https://sportnginsite.readme.io/docs/video), [Games](https://sportnginv2.readme.io/docs/games-show), and [Subseasons](https://sportnginv2.readme.io/docs/subseasons-show).\n\nA good way to find teams is to use the [Team Finder](https://sportnginv2.readme.io/docs/team-finder-index) endpoint. The [Team Finder](https://sportnginv2.readme.io/docs/team-finder-index) allows you to search for [Teams](https://sportnginv2.readme.io/docs/teams-show) based on the `team_name`, `site_name`, `site_abbreviation`, and/or `domain_name`.\n\nA [Season](https://sportnginv2.readme.io/docs/seasons-show) is the portion of one year in which the regulated Games of a Sport are in session.\n\nA [Subseason](https://sportnginv2.readme.io/docs/subseasons-show) is a segmented portion of a [Season](https://sportnginv2.readme.io/docs/seasons-show). A [Subseason](https://sportnginv2.readme.io/docs/subseasons-show) could be named the \"Regular Season\", the \"Playoffs,\" or the \"State Tournament.\"\n\n###Associations\nA League has multiple [Divisions](doc:divisions) (which is the actual subgrouping of [Teams](https://sportnginv2.readme.io/docs/teams-show)). A League has many [League Instances](https://sportnginv2.readme.io/docs/league-instances-index).\n\nA [Divison](doc:divisons-create) is a subgrouping of [Teams](https://sportnginv2.readme.io/docs/teams-index) that belong to a [League](https://sportnginv2.readme.io/docs/leagues). A Division has many [Division Instances](doc:division-instances-index). A [Division](doc:divisions) also has many [Teams](https://sportnginv2.readme.io/docs/teams-show).\n\nA [Subseason](https://sportnginv2.readme.io/docs/subseasons-show) belongs to a [Season](https://sportnginv2.readme.io/docs/seasons-show), and has many [Team Instances](https://sportnginv2.readme.io/docs/team_instances-show) and [Games](https://sportnginv2.readme.io/docs/games-show).","link_url":"","project":"5641217e0ee5370d00da636d","title":"Leagues","user":"56cbf1419f4ae20b00644fde","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
Leagues
Hint
A League Instance can inform a League Instance Tree, which displays the structure of associated League Instance including dependent Subseasons, Division Instances Index, and Team Instances.
{"_id":"56e037fe5fc52e320024d851","title":"Leagues Index","user":"56548c568975c70d002ea4b4","api":{"examples":{"codes":[{"language":"curl","code":"curl --header \"Authorization: Bearer ACCESS_TOKEN\" --header \"Accept: application/json\" --header \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/leagues?site_id=11953\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/leagues?site_id=11953\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/leagues?site_id=11953\")\n .get()\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"name":"site_id","ref":"","required":true,"type":"int","in":"query","_id":"56cf355f5267d70b00494c3a","default":"","desc":"Id of site"},{"name":"site_url","in":"query","_id":"56cf355f5267d70b00494c39","ref":"","required":false,"desc":"Url of site","default":"","type":"string"}],"results":{"codes":[{"code":"[\n {\n \"id\": 27737,\n \"name\": \"Eastern League\",\n \"current_subseason_id\": 291621,\n \"site_id\": 11953,\n \"sport_id\": 1,\n \"image_id\": null,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-24T07:20:49-07:00\",\n \"button_title\": \"Eastern\",\n \"primary_color\": \"00AEEF\",\n \"secondary_color\": \"666666\",\n \"gender\": \"male\",\n \"abbrev\": \"East\",\n \"score_ribbon\": false,\n \"tweet_games\": null,\n \"game_sheet_label\": \"gamesheet\"\n },\n {\n \"id\": 27738,\n \"name\": \"Western League\",\n \"current_subseason_id\": 291622,\n \"site_id\": 11953,\n \"sport_id\": 1,\n \"image_id\": null,\n \"created_at\": \"2016-03-22T12:48:01-07:00\",\n \"updated_at\": \"2016-03-24T07:20:41-07:00\",\n \"button_title\": \"Western\",\n \"primary_color\": \"00AEEF\",\n \"secondary_color\": \"666666\",\n \"gender\": \"male\",\n \"abbrev\": \"West\",\n \"score_ribbon\": false,\n \"tweet_games\": null,\n \"game_sheet_label\": \"gamesheet\"\n }\n]","language":"json","status":200,"name":""},{"code":"{\n\t \"errors\": \"Site not found\"\n}","status":404,"language":"text"}]},"settings":"","url":"/leagues","auth":"required"},"createdAt":"2016-03-09T14:49:34.513Z","editedParams2":true,"excerpt":"The Index method returns an array of Leagues matching the given parameters.\n\nThis endpoint requires at least one parameter, either a `site_id` or a `site_url`. An error is thrown if any of the parameters are invalid.\n\n###Parameters","slug":"leagues-index","body":"###Attributes\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Name\",\n \"h-1\": \"Type\",\n \"h-2\": \"Description\",\n \"0-0\": \"id\",\n \"1-0\": \"name\",\n \"2-0\": \"current_subseason_id\",\n \"3-0\": \"site_id\",\n \"4-0\": \"sport_id\",\n \"5-0\": \"image_id\",\n \"6-0\": \"created_at\",\n \"7-0\": \"updated_at\",\n \"8-0\": \"button_title\",\n \"9-0\": \"primary_color\",\n \"10-0\": \"secondary_color\",\n \"11-0\": \"gender\",\n \"12-0\": \"abbrev\",\n \"13-0\": \"score_ribbon\",\n \"14-0\": \"tweet_games\",\n \"15-0\": \"game_sheet_label\",\n \"0-1\": \"Integer\",\n \"1-1\": \"String\",\n \"2-1\": \"Integer\",\n \"3-1\": \"Integer\",\n \"4-1\": \"Integer\",\n \"5-1\": \"Integer\",\n \"6-1\": \"Timestamp\",\n \"7-1\": \"Timestamp\",\n \"8-1\": \"String\",\n \"9-1\": \"String\",\n \"10-1\": \"String\",\n \"11-1\": \"String\",\n \"12-1\": \"String\",\n \"13-1\": \"Boolean\",\n \"14-1\": \"Boolean\",\n \"15-1\": \"String\",\n \"0-2\": \"ID of league\",\n \"1-2\": \"Name of league\",\n \"2-2\": \"ID of the current subseason for the league. This could also be defined as the \\\"default\\\" subseason.\",\n \"3-2\": \"ID of the site that the league belongs to\",\n \"4-2\": \"ID of the sport that the league plays\",\n \"5-2\": \"ID of an image\",\n \"6-2\": \"Timestamp when created\",\n \"7-2\": \"Timestamp of last update\",\n \"8-2\": \"Title of league that shows up in navigation\",\n \"9-2\": \"Primary color used in styling of league pages\",\n \"10-2\": \"Secondary color used in styling of league pages\",\n \"11-2\": \"Gender of league\",\n \"12-2\": \"Abbreviation of league. Used in various locations that have limited text.\",\n \"13-2\": \"Display score ribbon on league page\",\n \"14-2\": \"Tweet games for league\",\n \"15-2\": \"League's label for game sheets. Possible values are \\\"gamesheet\\\" or \\\"boxscore\\\".\"\n },\n \"cols\": 3,\n \"rows\": 16\n}\n[/block]","order":1,"type":"get","updates":[],"__v":0,"githubsync":"","hidden":false,"link_url":"","sync_unique":"","parentDoc":null,"project":"5641217e0ee5370d00da636d","version":"56cca51eca43550b002813fa","category":"56e03709f97d422900d63922","editedParams":true,"isReference":true,"link_external":false,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getLeagues Index
Query Params
id
Integer
ID of league
name
String
Name of league
current_subseason_id
Integer
ID of the current subseason for the league. This could also be defined as the "default" subseason.
site_id
Integer
ID of the site that the league belongs to
sport_id
Integer
ID of the sport that the league plays
image_id
Integer
ID of an image
created_at
Timestamp
Timestamp when created
updated_at
Timestamp
Timestamp of last update
button_title
String
Title of league that shows up in navigation
primary_color
String
Primary color used in styling of league pages
secondary_color
String
Secondary color used in styling of league pages
gender
String
Gender of league
abbrev
String
Abbreviation of league. Used in various locations that have limited text.
score_ribbon
Boolean
Display score ribbon on league page
tweet_games
Boolean
Tweet games for league
game_sheet_label
String
League's label for game sheets. Possible values are "gamesheet" or "boxscore".
Definition
Examples
curl --header "Authorization: Bearer ACCESS_TOKEN" --header "Accept: application/json" --header "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/leagues?site_id=11953"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/leagues?site_id=11953")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.sportngin.com/leagues?site_id=11953")
.get()
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.build();
Response response = client.newCall(request).execute();
Result Format
[
{
"id": 27737,
"name": "Eastern League",
"current_subseason_id": 291621,
"site_id": 11953,
"sport_id": 1,
"image_id": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-24T07:20:49-07:00",
"button_title": "Eastern",
"primary_color": "00AEEF",
"secondary_color": "666666",
"gender": "male",
"abbrev": "East",
"score_ribbon": false,
"tweet_games": null,
"game_sheet_label": "gamesheet"
},
{
"id": 27738,
"name": "Western League",
"current_subseason_id": 291622,
"site_id": 11953,
"sport_id": 1,
"image_id": null,
"created_at": "2016-03-22T12:48:01-07:00",
"updated_at": "2016-03-24T07:20:41-07:00",
"button_title": "Western",
"primary_color": "00AEEF",
"secondary_color": "666666",
"gender": "male",
"abbrev": "West",
"score_ribbon": false,
"tweet_games": null,
"game_sheet_label": "gamesheet"
}
]
{
"errors": "Site not found"
}
{"_id":"56cf47d2336aa60b0086a224","api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/leagues/27737\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/leagues/27737\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/leagues/27737\")\n .get()\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"_id":"56cf47d2336aa60b0086a225","default":"","desc":"Id of the League","name":"id","ref":"","required":true,"type":"int","in":"path"}],"results":{"codes":[{"name":"","code":"{\n \"id\": 27737,\n \"name\": \"Eastern League\",\n \"current_subseason_id\": 291621,\n \"site_id\": 11953,\n \"sport_id\": 1,\n \"image_id\": null,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-24T07:20:49-07:00\",\n \"button_title\": \"Eastern\",\n \"primary_color\": \"00AEEF\",\n \"secondary_color\": \"666666\",\n \"gender\": \"male\",\n \"abbrev\": \"East\",\n \"score_ribbon\": false,\n \"tweet_games\": null,\n \"game_sheet_label\": \"gamesheet\"\n}","language":"json","status":200}]},"settings":"","url":"/leagues/:id"},"createdAt":"2016-02-25T18:28:34.751Z","link_external":false,"project":"5641217e0ee5370d00da636d","body":"[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Hint\",\n \"body\": \"This endpoint is useful when there are many leagues in a [Site](ref:sites). However, since the League Index endpoint returns the full League document in the results array, the League Index endpoint is sufficient most of the time.\"\n}\n[/block]","editedParams2":true,"githubsync":"","hidden":false,"order":2,"sync_unique":"","updates":[],"isReference":true,"link_url":"","type":"get","user":"569e96c56b4a2c0d007e9153","__v":0,"category":"56e03709f97d422900d63922","editedParams":true,"excerpt":"The Show method returns a single League for a given `id`.\n\n###Parameters","parentDoc":null,"slug":"leagues-show","title":"Leagues Show","version":"56cca51eca43550b002813fa","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getLeagues Show
Path Params
Hint
This endpoint is useful when there are many leagues in a Site. However, since the League Index endpoint returns the full League document in the results array, the League Index endpoint is sufficient most of the time.
Definition
Examples
curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/leagues/27737"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/leagues/27737")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.sportngin.com/leagues/27737")
.get()
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.build();
Response response = client.newCall(request).execute();
Result Format
{
"id": 27737,
"name": "Eastern League",
"current_subseason_id": 291621,
"site_id": 11953,
"sport_id": 1,
"image_id": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-24T07:20:49-07:00",
"button_title": "Eastern",
"primary_color": "00AEEF",
"secondary_color": "666666",
"gender": "male",
"abbrev": "East",
"score_ribbon": false,
"tweet_games": null,
"game_sheet_label": "gamesheet"
}
{"_id":"56e1978e108d6a1700599138","api":{"examples":{"codes":[{"code":"curl -X GET -H \"Content-Type: application/json\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/league_instances?league_id=27737\"","language":"curl"},{"code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/league_instances?league_id=27737\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body","language":"ruby"},{"code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/league_instances?league_id=27737\")\n .get()\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .build();\n\nResponse response = client.newCall(request).execute();","language":"java"}]},"method":"get","params":[{"name":"league_id","in":"query","_id":"56e197da686c7d200086070b","ref":"","required":true,"desc":"Id of League","default":"","type":"int"}],"results":{"codes":[{"code":"[\n {\n \"id\": 41683,\n \"season_id\": 267440,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n \"league_id\": 27737,\n \"season_name\": \"2016\"\n }\n]","language":"json","status":200,"name":""},{"name":"","code":"{\n \"errors\": \"The parameter league_id is required\"\n}","language":"json","status":412}]},"settings":"","url":"/league_instances","auth":"required"},"editedParams":true,"link_external":false,"order":3,"body":"###Attributes\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Name\",\n \"h-1\": \"Type\",\n \"h-2\": \"Description\",\n \"0-0\": \"id\",\n \"1-0\": \"season_id\",\n \"2-0\": \"created_at\",\n \"3-0\": \"updated_at\",\n \"4-0\": \"league_id\",\n \"5-0\": \"season_name\",\n \"5-1\": \"String\",\n \"4-1\": \"Integer\",\n \"1-1\": \"Integer\",\n \"0-1\": \"Integer\",\n \"0-2\": \"ID of LeagueInstance\",\n \"1-2\": \"ID of Season\",\n \"4-2\": \"ID of League\",\n \"5-2\": \"Name of Season (derived)\",\n \"3-1\": \"Timestamp\",\n \"2-1\": \"Timestamp\",\n \"2-2\": \"Timestamp when created\",\n \"3-2\": \"Timestamp of last update\"\n },\n \"cols\": 3,\n \"rows\": 6\n}\n[/block]","editedParams2":true,"excerpt":"The Index method returns an array of League Instances matching the given parameters.\n\n###Parameters","sync_unique":"","user":"569e96c56b4a2c0d007e9153","__v":1,"createdAt":"2016-03-10T15:49:34.919Z","isReference":true,"parentDoc":null,"title":"League Instances Index","updates":[],"version":"56cca51eca43550b002813fa","category":"56e03709f97d422900d63922","githubsync":"","hidden":false,"link_url":"","project":"5641217e0ee5370d00da636d","slug":"league-instances-index","type":"get","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getLeague Instances Index
Query Params
Definition
Examples
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/league_instances?league_id=27737"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/league_instances?league_id=27737")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["content-type"] = 'application/json'
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.sportngin.com/league_instances?league_id=27737")
.get()
.addHeader("content-type", "application/json")
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.build();
Response response = client.newCall(request).execute();
Result Format
[
{
"id": 41683,
"season_id": 267440,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"league_id": 27737,
"season_name": "2016"
}
]
{
"errors": "The parameter league_id is required"
}
{"_id":"56e1a7db71e22d2b009801e5","type":"get","updates":[],"api":{"settings":"","url":"/league_instance_tree/:id","auth":"required","examples":{"codes":[{"code":"curl -X GET -H \"Content-Type: application/json\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/league_instance_tree/41683\"","language":"curl"},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/league_instance_tree/41683\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/league_instance_tree/41683\")\n .get()\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"in":"path","_id":"56e1a7db71e22d2b009801e6","ref":"","required":true,"desc":"Id of LeagueInstance","default":"","type":"int","name":"id"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n \"node\": {\n \"id\": 2458062,\n \"node_type\": \"LeagueInstance\",\n \"data\": {\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"id\": 41683,\n \"league_id\": 27737,\n \"season_id\": 267440,\n \"updated_at\": \"2016-03-22T12:46:58-07:00\"\n },\n \"children\": [\n {\n \"node\": {\n \"id\": 2458064,\n \"node_type\": \"Subseason\",\n \"data\": {\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"id\": 291621,\n \"name\": \"Regular Season\",\n \"position\": 1,\n \"season_id\": 267440,\n \"snl_scoring_enabled\": true,\n \"statistic_grouping_id\": 417884,\n \"updated_at\": \"2016-04-11T09:02:40-07:00\",\n \"workers_completed\": null,\n \"live_scoring_stat_configuration\": {\n \"show_plus_minus\": null,\n \"fair_play_points\": false\n }\n },\n \"children\": [\n {\n \"node\": {\n \"id\": 2458074,\n \"node_type\": \"DivisionInstance\",\n \"data\": {\n \"created_at\": \"2016-03-22T12:52:51-07:00\",\n \"division_id\": 66180,\n \"id\": 181552,\n \"max_standings_points\": null,\n \"non_standing\": false,\n \"updated_at\": \"2016-03-22T12:52:51-07:00\",\n \"division\": {\n \"abbrev\": \"Ocn\",\n \"button_title\": \"Oceanic\",\n \"created_at\": \"2016-03-22T12:52:51-07:00\",\n \"id\": 66180,\n \"image_id\": null,\n \"league_id\": 27737,\n \"name\": \"Oceanic Division\",\n \"primary_color\": \"00AEEF\",\n \"secondary_color\": \"666666\",\n \"updated_at\": \"2016-03-22T14:25:05-07:00\"\n }\n },\n \"children\": [\n {\n \"node\": {\n \"id\": 2458139,\n \"node_type\": \"TeamInstance\",\n \"data\": {\n \"abbrev\": \"Bos\",\n \"affects_standings\": true,\n \"button_title\": \"Boston\",\n \"created_at\": \"2016-03-22T13:19:12-07:00\",\n \"gender\": \"male\",\n \"id\": 1876243,\n \"image_id\": null,\n \"management_team_id\": null,\n \"name\": \"Boston Bears\",\n \"opponent\": null,\n \"parent_team_instance_id\": null,\n \"primary_color\": \"000000\",\n \"roster_id\": 1837158,\n \"secondary_color\": \"000000\",\n \"team_id\": 1373611,\n \"updated_at\": \"2016-03-23T09:34:28-07:00\",\n \"team\": {\n \"abbrev\": \"Bos\",\n \"android_whitelabel_url\": null,\n \"button_title\": \"Boston\",\n \"created_at\": \"2016-03-22T13:06:41-07:00\",\n \"gender\": \"male\",\n \"id\": 1373611,\n \"image_id\": null,\n \"ios_whitelabel_url\": null,\n \"name\": \"Boston Bears\",\n \"opponent\": null,\n \"parent_team_id\": null,\n \"primary_color\": \"000000\",\n \"secondary_color\": \"000000\",\n \"sport_id\": 1,\n \"updated_at\": \"2016-03-23T09:34:28-07:00\"\n }\n },\n \"children\": []\n }\n },\n ...","name":""}]}},"editedParams":true,"hidden":false,"order":4,"parentDoc":null,"category":"56e03709f97d422900d63922","excerpt":"The Show method returns the page node structure beneath the [League Instance](https://sportnginv2.readme.io/docs/league-instances-index).\n\n###Parameters","link_url":"","title":"League Instance Tree Show","user":"569e96c56b4a2c0d007e9153","editedParams2":true,"githubsync":"","isReference":true,"createdAt":"2016-03-10T16:59:07.252Z","link_external":false,"project":"5641217e0ee5370d00da636d","slug":"league-instance-tree-show","sync_unique":"","__v":0,"body":"###Attributes\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Name\",\n \"h-1\": \"Type\",\n \"h-2\": \"Description\",\n \"0-0\": \"id\",\n \"0-1\": \"Integer\",\n \"0-2\": \"ID of PageNode\",\n \"1-0\": \"node_type\",\n \"1-1\": \"String\",\n \"2-0\": \"data\",\n \"2-1\": \"Object\",\n \"3-0\": \"children\",\n \"3-1\": \"Array\",\n \"1-2\": \"Type of PageNode\",\n \"2-2\": \"Data for object related to PageNode\",\n \"3-2\": \"Children PageNodes of this PageNode\"\n },\n \"cols\": 3,\n \"rows\": 4\n}\n[/block]","version":"56cca51eca43550b002813fa","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getLeague Instance Tree Show
Definition
Examples
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/league_instance_tree/41683"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/league_instance_tree/41683")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["content-type"] = 'application/json'
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.sportngin.com/league_instance_tree/41683")
.get()
.addHeader("content-type", "application/json")
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.build();
Response response = client.newCall(request).execute();
Result Format
{
"node": {
"id": 2458062,
"node_type": "LeagueInstance",
"data": {
"created_at": "2016-03-22T12:46:58-07:00",
"id": 41683,
"league_id": 27737,
"season_id": 267440,
"updated_at": "2016-03-22T12:46:58-07:00"
},
"children": [
{
"node": {
"id": 2458064,
"node_type": "Subseason",
"data": {
"created_at": "2016-03-22T12:46:58-07:00",
"id": 291621,
"name": "Regular Season",
"position": 1,
"season_id": 267440,
"snl_scoring_enabled": true,
"statistic_grouping_id": 417884,
"updated_at": "2016-04-11T09:02:40-07:00",
"workers_completed": null,
"live_scoring_stat_configuration": {
"show_plus_minus": null,
"fair_play_points": false
}
},
"children": [
{
"node": {
"id": 2458074,
"node_type": "DivisionInstance",
"data": {
"created_at": "2016-03-22T12:52:51-07:00",
"division_id": 66180,
"id": 181552,
"max_standings_points": null,
"non_standing": false,
"updated_at": "2016-03-22T12:52:51-07:00",
"division": {
"abbrev": "Ocn",
"button_title": "Oceanic",
"created_at": "2016-03-22T12:52:51-07:00",
"id": 66180,
"image_id": null,
"league_id": 27737,
"name": "Oceanic Division",
"primary_color": "00AEEF",
"secondary_color": "666666",
"updated_at": "2016-03-22T14:25:05-07:00"
}
},
"children": [
{
"node": {
"id": 2458139,
"node_type": "TeamInstance",
"data": {
"abbrev": "Bos",
"affects_standings": true,
"button_title": "Boston",
"created_at": "2016-03-22T13:19:12-07:00",
"gender": "male",
"id": 1876243,
"image_id": null,
"management_team_id": null,
"name": "Boston Bears",
"opponent": null,
"parent_team_instance_id": null,
"primary_color": "000000",
"roster_id": 1837158,
"secondary_color": "000000",
"team_id": 1373611,
"updated_at": "2016-03-23T09:34:28-07:00",
"team": {
"abbrev": "Bos",
"android_whitelabel_url": null,
"button_title": "Boston",
"created_at": "2016-03-22T13:06:41-07:00",
"gender": "male",
"id": 1373611,
"image_id": null,
"ios_whitelabel_url": null,
"name": "Boston Bears",
"opponent": null,
"parent_team_id": null,
"primary_color": "000000",
"secondary_color": "000000",
"sport_id": 1,
"updated_at": "2016-03-23T09:34:28-07:00"
}
},
"children": []
}
},
{"_id":"57052d36ecfca80e009992a8","slug":"divisions","title":"Divisions","__v":22,"api":{"params":[],"results":{"codes":[{"language":"json","code":"{}","name":"","status":200},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":"","auth":"required","examples":{"codes":[]}},"category":"56e03709f97d422900d63922","isReference":true,"type":"basic","hidden":false,"link_url":"","order":5,"parentDoc":null,"excerpt":"While _not accessible directly through the API_, it is useful to understand the relationship between a Division and a [Division Instance](https://sportnginv2.readme.io/docs/division-instances-create). A Division is a logical grouping of [Teams](https://sportnginv2.readme.io/docs/teams-show) in the [League](https://sportnginv2.readme.io/docs/leagues), and a [Division Instance](https://sportnginv2.readme.io/docs/division-instances-create) is the instance of that Division for the current [Season](https://sportnginv2.readme.io/docs/seasons-show).","githubsync":"","link_external":false,"user":"56e71f9edee212320019e731","sync_unique":"","updates":[],"version":"56cca51eca43550b002813fa","body":"###Attributes\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Attribute\",\n \"h-1\": \"Type\",\n \"h-2\": \"Notes\",\n \"0-0\": \"id\",\n \"0-1\": \"Integer\",\n \"0-2\": \"Unique id assigned by NGIN\",\n \"1-0\": \"name\",\n \"1-1\": \"String\",\n \"1-2\": \"Division name\",\n \"2-0\": \"button_title\",\n \"2-1\": \"String\",\n \"2-2\": \"Button title for the division\",\n \"3-0\": \"abbrev\",\n \"3-1\": \"String\",\n \"3-2\": \"Division abbreviation\",\n \"4-0\": \"image_id\",\n \"4-1\": \"Integer\",\n \"4-2\": \"Image id for the division\",\n \"5-0\": \"primary_color\",\n \"5-1\": \"String\",\n \"5-2\": \"Primary color for the division\",\n \"6-0\": \"secondary_color\",\n \"6-1\": \"String\",\n \"6-2\": \"Secondary color for the division\",\n \"7-0\": \"created_at\",\n \"7-1\": \"Datetime\",\n \"7-2\": \"Timestamp of creation\",\n \"8-0\": \"updated_at\",\n \"8-1\": \"Datetime\",\n \"8-2\": \"Timestamp of last update\",\n \"9-0\": \"league_id\",\n \"9-1\": \"Integer\",\n \"9-2\": \"League id the division belongs to\"\n },\n \"cols\": 3,\n \"rows\": 10\n}\n[/block]","createdAt":"2016-04-06T15:37:26.012Z","project":"5641217e0ee5370d00da636d","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
Divisions
id
Integer
Unique id assigned by NGIN
name
String
Division name
button_title
String
Button title for the division
abbrev
String
Division abbreviation
image_id
Integer
Image id for the division
primary_color
String
Primary color for the division
secondary_color
String
Secondary color for the division
created_at
Datetime
Timestamp of creation
updated_at
Datetime
Timestamp of last update
league_id
Integer
League id the division belongs to
{"_id":"57052e5e849f721900f279b4","__v":3,"hidden":false,"isReference":true,"order":6,"version":"56cca51eca43550b002813fa","sync_unique":"","user":"56e71f9edee212320019e731","editedParams":true,"editedParams2":true,"githubsync":"","link_url":"","parentDoc":null,"title":"Division Instances Index","updates":[],"api":{"params":[{"ref":"","required":true,"desc":"Id of subseason the divisions belong to","default":"","type":"int","name":"subseason_id","in":"query","_id":"57166fe3b5af590e00a0ffda"}],"results":{"codes":[{"language":"json","status":200,"name":"","code":"[\n {\n \"id\": 181552,\n \"created_at\": \"2016-03-22T12:52:51-07:00\",\n \"updated_at\": \"2016-03-22T12:52:51-07:00\",\n \"division_id\": 66180,\n \"non_standing\": false,\n \"max_standings_points\": null\n },\n {\n \"id\": 181553,\n \"created_at\": \"2016-03-22T12:54:23-07:00\",\n \"updated_at\": \"2016-03-22T12:54:23-07:00\",\n \"division_id\": 66181,\n \"non_standing\": false,\n \"max_standings_points\": null\n }\n]"}]},"settings":"","url":"/division_instances","auth":"required","examples":{"codes":[{"code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/division_instances?subseason_id=291621\"","language":"curl"},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/division_instances?subseason_id=291621\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/division_instances?subseason_id=291621\")\n .get()\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get"},"category":"56e03709f97d422900d63922","createdAt":"2016-04-06T15:42:22.928Z","excerpt":"The Index method returns an array of Division Instances for the given `subseason_id`. A Division Instance is an instance of a specific [Divisions](https://sportnginv2.readme.io/docs/divisions), and effectively represents a single [Season](https://sportnginv2.readme.io/docs/seasons-show) within the [League](https://sportnginv2.readme.io/docs/leagues).\n\n###Parameters","body":"###Attributes\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Attribute\",\n \"h-1\": \"Type\",\n \"h-2\": \"Notes\",\n \"0-0\": \"id\",\n \"0-1\": \"Integer\",\n \"1-0\": \"division_id\",\n \"1-1\": \"Integer\",\n \"2-0\": \"non_standing\",\n \"2-1\": \"Boolean\",\n \"2-2\": \"whether the division instance affects standings\",\n \"3-0\": \"created_at\",\n \"3-1\": \"Datetime\",\n \"3-2\": \"Timestamp of creation\",\n \"4-0\": \"updated_at\",\n \"4-1\": \"Datetime\",\n \"4-2\": \"Timestamp of last update\"\n },\n \"cols\": 3,\n \"rows\": 5\n}\n[/block]","link_external":false,"project":"5641217e0ee5370d00da636d","slug":"division-instances-index","type":"get","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getDivision Instances Index
Definition
Examples
curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/division_instances?subseason_id=291621"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/division_instances?subseason_id=291621")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.sportngin.com/division_instances?subseason_id=291621")
.get()
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.build();
Response response = client.newCall(request).execute();
Result Format
[
{
"id": 181552,
"created_at": "2016-03-22T12:52:51-07:00",
"updated_at": "2016-03-22T12:52:51-07:00",
"division_id": 66180,
"non_standing": false,
"max_standings_points": null
},
{
"id": 181553,
"created_at": "2016-03-22T12:54:23-07:00",
"updated_at": "2016-03-22T12:54:23-07:00",
"division_id": 66181,
"non_standing": false,
"max_standings_points": null
}
]
{"_id":"57eeb35fcc36920e00bff4c0","isReference":true,"updates":[],"githubsync":"","hidden":false,"api":{"auth":"required","examples":{"codes":[{"name":"cURL - New Division","code":"curl -X POST -H \"Authorization: Bearer ACCESS_TOKEN \" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n \"parent_node_id\": 2458064,\n \"existing_or_new\": \"new\",\n \"top_template_id\": 23221,\n \"bottom_template_id\": 23221,\n \"division\": {\n \"name\": \"Test division\",\n \"button_title\": \"Test\",\n \"abbrev\": \"TD\",\n \"primary_color\": \"FFFFFF\",\n \"secondary_color\": \"000000\"\n }\n}' \"https://api.sportngin.com/division_instances\"","language":"curl"},{"name":"Ruby - New Division","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/division_instances\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n \\\"parent_node_id\\\": 2458064,\\n \\\"existing_or_new\\\": \\\"new\\\",\\n \\\"top_template_id\\\": 23221,\\n \\\"bottom_template_id\\\": 23221,\\n \\\"division\\\": {\\n \\\"name\\\": \\\"Test division\\\",\\n \\\"button_title\\\": \\\"Test\\\",\\n \\\"abbrev\\\": \\\"TD\\\",\\n \\\"primary_color\\\": \\\"FFFFFF\\\",\\n \\\"secondary_color\\\": \\\"000000\\\"\\n }\\n}\"\n\nresponse = http.request(request)\nputs response.read_body","language":"ruby"},{"name":"Java - New Division","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n \\\"parent_node_id\\\": 2458064,\\n \\\"existing_or_new\\\": \\\"new\\\",\\n \\\"top_template_id\\\": 23221,\\n \\\"bottom_template_id\\\": 23221,\\n \\\"division\\\": {\\n \\\"name\\\": \\\"Test division\\\",\\n \\\"button_title\\\": \\\"Test\\\",\\n \\\"abbrev\\\": \\\"TD\\\",\\n \\\"primary_color\\\": \\\"FFFFFF\\\",\\n \\\"secondary_color\\\": \\\"000000\\\"\\n }\\n}\");\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/division_instances\")\n .post(body)\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .addHeader(\"content-type\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();","language":"java"},{"name":"cURL - Existing Division","code":"curl -X POST -H \"Authorization: Bearer ACCESS_TOKEN \" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n \"parent_node_id\": 2458062,\n \"division_id\": 66180\n}' \"https://api.sportngin.com/division_instances\"","language":"curl"},{"name":"Ruby - Existing Division","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/division_instances\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n \\\"parent_node_id\\\": 2458062,\\n \\\"division_id\\\": 66180\\n}\"\n\nresponse = http.request(request)\nputs response.read_body","language":"ruby"},{"name":"Java - Existing Division","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n \\\"parent_node_id\\\": 2458062,\\n \\\"division_id\\\": 66180\\n}\");\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/division_instances\")\n .post(body)\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .addHeader(\"content-type\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();","language":"java"}]},"method":"post","params":[{"_id":"57eeb756cc36920e00bff4c5","ref":"","in":"body","required":true,"desc":"","default":"","type":"int","name":"parent_node_id"},{"_id":"57eeb756cc36920e00bff4c4","default":"","desc":"Needed if the division instance is not being created as part of an existing division","in":"body","name":"new","ref":"","required":false,"type":"string"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n \"id\": 209310,\n \"created_at\": \"2016-09-30T12:00:52-07:00\",\n \"updated_at\": \"2016-09-30T12:00:52-07:00\",\n \"division_id\": 66180,\n \"non_standing\": false,\n \"max_standings_points\": null\n}","name":""}]},"settings":"","url":"/division_instances"},"createdAt":"2016-09-30T18:47:59.386Z","excerpt":"The Create method accepts a single Division Instance (see attributes above) and creates a new record in SportsEngine.\n\n###Parameters","link_external":false,"project":"5641217e0ee5370d00da636d","slug":"division-instances-create","title":"Division Instances Create","__v":2,"body":"","user":"56548c568975c70d002ea4b4","version":"56cca51eca43550b002813fa","order":7,"parentDoc":null,"sync_unique":"","type":"post","category":"56e03709f97d422900d63922","link_url":"","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postDivision Instances Create
Body Params
Definition
Examples
curl -X POST -H "Authorization: Bearer ACCESS_TOKEN " -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -H "Content-Type: application/json" -d '{
"parent_node_id": 2458064,
"existing_or_new": "new",
"top_template_id": 23221,
"bottom_template_id": 23221,
"division": {
"name": "Test division",
"button_title": "Test",
"abbrev": "TD",
"primary_color": "FFFFFF",
"secondary_color": "000000"
}
}' "https://api.sportngin.com/division_instances"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/division_instances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
request["content-type"] = 'application/json'
request.body = "{\n \"parent_node_id\": 2458064,\n \"existing_or_new\": \"new\",\n \"top_template_id\": 23221,\n \"bottom_template_id\": 23221,\n \"division\": {\n \"name\": \"Test division\",\n \"button_title\": \"Test\",\n \"abbrev\": \"TD\",\n \"primary_color\": \"FFFFFF\",\n \"secondary_color\": \"000000\"\n }\n}"
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"parent_node_id\": 2458064,\n \"existing_or_new\": \"new\",\n \"top_template_id\": 23221,\n \"bottom_template_id\": 23221,\n \"division\": {\n \"name\": \"Test division\",\n \"button_title\": \"Test\",\n \"abbrev\": \"TD\",\n \"primary_color\": \"FFFFFF\",\n \"secondary_color\": \"000000\"\n }\n}");
Request request = new Request.Builder()
.url("https://api.sportngin.com/division_instances")
.post(body)
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
curl -X POST -H "Authorization: Bearer ACCESS_TOKEN " -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -H "Content-Type: application/json" -d '{
"parent_node_id": 2458062,
"division_id": 66180
}' "https://api.sportngin.com/division_instances"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/division_instances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
request["content-type"] = 'application/json'
request.body = "{\n \"parent_node_id\": 2458062,\n \"division_id\": 66180\n}"
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"parent_node_id\": 2458062,\n \"division_id\": 66180\n}");
Request request = new Request.Builder()
.url("https://api.sportngin.com/division_instances")
.post(body)
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
Result Format
{
"id": 209310,
"created_at": "2016-09-30T12:00:52-07:00",
"updated_at": "2016-09-30T12:00:52-07:00",
"division_id": 66180,
"non_standing": false,
"max_standings_points": null
}
{"_id":"57eeb2dd5347840e0053f1a8","order":8,"hidden":false,"link_external":false,"link_url":"","project":"5641217e0ee5370d00da636d","title":"Division Instances Update","api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X PUT -H \"Authorization: Bearer ACCESS_TOKEN \" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n\t\"max_standings_points\": 44.00\n}\n}' \"https://api.sportngin.com/division_instances/181552\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/division_instances/181552\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n \\\"max_standings_points\\\": 44.00 \\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n \\\"max_standings_points\\\": 44.00 \\n}\");\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/division_instances/181552\")\n .put(body)\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .addHeader(\"content-type\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();","language":"java"}]},"method":"put","params":[{"default":"","type":"int","name":"id","_id":"577e8f45a74eb40e00d97b62","ref":"","in":"path","required":true,"desc":"Id of DivisionInstance to update"}],"results":{"codes":[{"status":200,"name":"","code":"{\n \"id\": 181552,\n \"created_at\": \"2016-03-22T12:52:51-07:00\",\n \"updated_at\": \"2016-09-30T11:40:25-07:00\",\n \"division_id\": 66180,\n \"non_standing\": false,\n \"max_standings_points\": \"44.0\"\n}","language":"json"}]},"settings":"","url":"/division_instances/:id"},"createdAt":"2016-09-30T18:45:49.661Z","excerpt":"The Update method updates the provided fields for a given `id`.\n\n###Parameters","type":"put","updates":[],"version":"56cca51eca43550b002813fa","isReference":true,"parentDoc":null,"slug":"division-instances-update","githubsync":"","sync_unique":"","user":"56548c568975c70d002ea4b4","__v":0,"body":"","category":"56e03709f97d422900d63922","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putDivision Instances Update
Path Params
Definition
Examples
curl -X PUT -H "Authorization: Bearer ACCESS_TOKEN " -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -H "Content-Type: application/json" -d '{
"max_standings_points": 44.00
}
}' "https://api.sportngin.com/division_instances/181552"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/division_instances/181552")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Put.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
request["content-type"] = 'application/json'
request.body = "{\n \"max_standings_points\": 44.00 \n}"
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"max_standings_points\": 44.00 \n}");
Request request = new Request.Builder()
.url("https://api.sportngin.com/division_instances/181552")
.put(body)
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
Result Format
{
"id": 181552,
"created_at": "2016-03-22T12:52:51-07:00",
"updated_at": "2016-09-30T11:40:25-07:00",
"division_id": 66180,
"non_standing": false,
"max_standings_points": "44.0"
}
{"_id":"57eeaabb7a53690e000abc13","excerpt":"The Delete method permanently deletes the associated DivisionInstance record in SportsEngine. *This method takes action upon initial invocation and cannot be reversed.*\n\n###Parameters","githubsync":"","isReference":true,"link_external":false,"link_url":"","title":"Division Instances Delete","updates":[],"category":"56e03709f97d422900d63922","createdAt":"2016-09-30T18:11:07.379Z","order":9,"parentDoc":null,"type":"delete","body":"","project":"5641217e0ee5370d00da636d","sync_unique":"","user":"56548c568975c70d002ea4b4","version":"56cca51eca43550b002813fa","api":{"examples":{"codes":[{"language":"curl","code":"curl -X DELETE -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/division_instances/209258\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/division_instances/209258\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/division_instances/209258\")\n .delete(null)\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"delete","params":[{"name":"id","_id":"57114eae5ba0d80e00f51614","ref":"","in":"path","required":true,"desc":"Id belonging to the division_instance of interest","default":"","type":"int"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n \"id\": 209258,\n \"created_at\": \"2016-09-28T14:38:04-07:00\",\n \"updated_at\": \"2016-09-28T14:38:04-07:00\",\n \"division_id\": 77569,\n \"non_standing\": false,\n \"max_standings_points\": null\n}","name":""}]},"settings":"","url":"/division_instances/:id","auth":"required"},"hidden":false,"slug":"division-instances-delete","__v":0,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteDivision Instances Delete
Path Params
Definition
Examples
curl -X DELETE -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/division_instances/209258"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/division_instances/209258")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Delete.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.sportngin.com/division_instances/209258")
.delete(null)
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.build();
Response response = client.newCall(request).execute();
Result Format
{
"id": 209258,
"created_at": "2016-09-28T14:38:04-07:00",
"updated_at": "2016-09-28T14:38:04-07:00",
"division_id": 77569,
"non_standing": false,
"max_standings_points": null
}
{"_id":"57f26f94130b941700a4bc47","slug":"teams","sync_unique":"","type":"basic","updates":[],"api":{"results":{"codes":[{"code":"{}","name":"","status":200,"language":"json"},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"githubsync":"","link_external":false,"parentDoc":null,"title":"Teams","category":"56e03709f97d422900d63922","link_url":"","order":10,"project":"5641217e0ee5370d00da636d","excerpt":"A Team can belong to a Division in a [League](https://sportnginv2.readme.io/docs/leagues), a league with no divisions, or exist as solo team league. A [Team Instance](https://sportnginv2.readme.io/docs/team-instances-create) is the instance of that Team for the current [Season](https://sportnginv2.readme.io/docs/seasons-show).","hidden":false,"isReference":true,"user":"56548c568975c70d002ea4b4","__v":0,"body":"###Attributes\n[block:parameters]\n{\n \"data\": {\n \"0-0\": \"id\",\n \"0-1\": \"Integer\",\n \"1-0\": \"name\",\n \"1-1\": \"String\",\n \"2-0\": \"button_title\",\n \"2-1\": \"String\",\n \"3-0\": \"abbrev\",\n \"3-1\": \"String\",\n \"4-0\": \"image_id\",\n \"4-1\": \"Integer\",\n \"5-0\": \"primary_color\",\n \"5-1\": \"String\",\n \"6-0\": \"secondary_color\",\n \"6-1\": \"String\",\n \"7-0\": \"gender\",\n \"7-1\": \"Enum\",\n \"8-0\": \"created_at\",\n \"8-1\": \"DateTime\",\n \"9-0\": \"updated_at\",\n \"9-1\": \"DateTime\",\n \"10-0\": \"sport_id\",\n \"10-1\": \"Integer\",\n \"11-0\": \"opponent\",\n \"11-1\": \"Integer\",\n \"12-0\": \"parent_team_id\",\n \"12-1\": \"Integer\",\n \"13-0\": \"ios_whitelabel_url\",\n \"13-1\": \"String\",\n \"14-0\": \"android_whitelabel_url\",\n \"14-1\": \"String\",\n \"0-2\": \"Unique id assigned by NGIN\",\n \"1-2\": \"Team name\",\n \"2-2\": \"Button title for the team\",\n \"3-2\": \"Team abbreviation\",\n \"4-2\": \"Image id for the team\",\n \"5-2\": \"Primary color for the team\",\n \"6-2\": \"Primary color for the team\",\n \"8-2\": \"Timestamp of creation\",\n \"9-2\": \"Timestamp of last update\",\n \"12-2\": \"Id of team that is above this team\",\n \"7-2\": \"Gender for the team\",\n \"10-2\": \"Id of the sport which the team belongs to\",\n \"11-2\": \"Set to `1` if the team is in the system as an opponent in a solo team league. Default value = `null`\",\n \"13-2\": \"URL of the iTunes store item for the team's app, if applicable\",\n \"14-2\": \"URL of the Google Play store item for the team's app, if applicable\"\n },\n \"cols\": 3,\n \"rows\": 15\n}\n[/block]","createdAt":"2016-10-03T14:47:48.783Z","version":"56cca51eca43550b002813fa","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
Teams
id
Integer
Unique id assigned by NGIN
name
String
Team name
button_title
String
Button title for the team
abbrev
String
Team abbreviation
image_id
Integer
Image id for the team
primary_color
String
Primary color for the team
secondary_color
String
Primary color for the team
gender
Enum
Gender for the team
created_at
DateTime
Timestamp of creation
updated_at
DateTime
Timestamp of last update
sport_id
Integer
Id of the sport which the team belongs to
opponent
Integer
Set to 1
if the team is in the system as an opponent in a solo team league. Default value = null
parent_team_id
Integer
Id of team that is above this team
ios_whitelabel_url
String
URL of the iTunes store item for the team's app, if applicable
android_whitelabel_url
String
URL of the Google Play store item for the team's app, if applicable
{"_id":"571941aaac1e2e0e00183463","category":"56e03709f97d422900d63922","githubsync":"","sync_unique":"","type":"get","user":"56548c568975c70d002ea4b4","version":"56cca51eca43550b002813fa","api":{"url":"/teams","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/teams?site_id=11953\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/teams?site_id=11953\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/teams?site_id=11953\")\n .get()\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .build();\n\nResponse response = client.newCall(request).execute();"},{"name":"cURL - with parameter","language":"curl","code":"curl -X GET -H \"Authorization: Bearer cb2e3bd276c7fdc8e0a9989c88c032b3\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Cache-Control: no-cache\" -H \"Postman-Token: 5021fb49-93c1-928f-6a63-f21dec82d677\" \"https://api.sportngin.com/teams?site_id=11953¤t_subseason_only=1\""},{"language":"ruby","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/teams?site_id=11953¤t_subseason_only=1\")\n .get()\n .addHeader(\"authorization\", \"Bearer cb2e3bd276c7fdc8e0a9989c88c032b3\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .addHeader(\"cache-control\", \"no-cache\")\n .addHeader(\"postman-token\", \"cb5b6b64-402a-3de6-6eff-cbe641ac55b2\")\n .build();\n\nResponse response = client.newCall(request).execute();","name":"Ruby - with parameter"},{"name":"Java - with parameter","language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/teams?site_id=11953¤t_subseason_only=1\")\n .get()\n .addHeader(\"authorization\", \"Bearer cb2e3bd276c7fdc8e0a9989c88c032b3\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .addHeader(\"cache-control\", \"no-cache\")\n .addHeader(\"postman-token\", \"cb5b6b64-402a-3de6-6eff-cbe641ac55b2\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"type":"int","name":"site_id","in":"query","_id":"571941aaac1e2e0e00183469","ref":"","required":true,"desc":"Id of site the teams belong to","default":""},{"type":"int","name":"league_ids","in":"query","_id":"571941aaac1e2e0e00183468","ref":"","required":true,"desc":"Id of leagues the teams belong to","default":""},{"required":true,"desc":"Id of teams to be returned","default":"","type":"int","name":"team_ids","in":"query","_id":"571941aaac1e2e0e00183467","ref":""},{"desc":"Id of sport the teams belong to","default":"","type":"int","name":"sport_id","in":"query","_id":"571941aaac1e2e0e00183466","ref":"","required":false},{"name":"write_access","in":"query","_id":"571941aaac1e2e0e00183465","ref":"","required":false,"desc":"","default":"","type":"int"},{"desc":"","default":"","type":"int","name":"current_subseason_only","in":"query","_id":"571941aaac1e2e0e00183464","ref":"","required":false}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"[\n {\n \"id\": 1373611,\n \"name\": \"Boston Bears\",\n \"button_title\": \"Boston\",\n \"abbrev\": \"Bos\",\n \"image_id\": null,\n \"primary_color\": \"000000\",\n \"secondary_color\": \"000000\",\n \"gender\": \"male\",\n \"created_at\": \"2016-03-22T13:06:41-07:00\",\n \"updated_at\": \"2016-03-23T09:34:28-07:00\",\n \"sport_id\": 1,\n \"opponent\": null,\n \"parent_team_id\": null,\n \"ios_whitelabel_url\": null,\n \"android_whitelabel_url\": null,\n \"sites\": [\n {\n \"id\": 11953,\n \"domain_id\": 1149,\n \"domain_name\": \"sportngin.com\",\n \"subdomain\": \"apidemo\",\n \"product_id\": 14,\n \"name\": \"Sport Ngin API Demo Site\",\n \"short_name\": \"Sport Ngin API Demo Site\",\n \"created_on\": \"2016-02-24T06:32:26-08:00\",\n \"updated_on\": \"2016-04-19T10:52:59-07:00\",\n \"created_by_user_id\": 3156422,\n \"updated_by_user_id\": null,\n \"timezone\": \"US/Central\",\n \"twitter_user_id\": null,\n \"layout_theme_id\": 51,\n \"secure_subdomain\": \"apidemo\",\n \"address_id\": 4447713,\n \"membership_privacy\": \"open\",\n \"membership_grace_period\": 1,\n \"boss_billing_account_id\": null,\n \"boss_organization_id\": 27743\n }\n ],\n \"leagues\": [\n {\n \"id\": 27737,\n \"name\": \"Eastern League\",\n \"current_subseason_id\": 291621,\n \"site_id\": 11953,\n \"sport_id\": 1,\n \"image_id\": null,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-24T07:20:49-07:00\",\n \"button_title\": \"Eastern\",\n \"primary_color\": \"00AEEF\",\n \"secondary_color\": \"666666\",\n \"gender\": \"male\",\n \"abbrev\": \"East\",\n \"score_ribbon\": false,\n \"tweet_games\": null,\n \"game_sheet_label\": \"gamesheet\"\n }\n ],\n \"thumbnails\": {},\n \"thumbnails_ssl\": {},\n \"current_subseason_ids\": [\n 291621\n ],\n \"seasons\": [\n {\n \"id\": 267440,\n \"name\": \"2016\",\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n \"solo_team_league_id\": null,\n \"has_metadata\": null,\n \"show_shared_schedule\": false,\n \"stat_preference\": {\n \"id\": 292407,\n \"updated_on\": \"2016-03-22T12:46:58-07:00\",\n \"created_on\": \"2016-03-22T12:46:58-07:00\",\n \"game_defaults\": {\n \"auto_navigate_to_play_details\": true,\n \"field_of_play_enabled\": false,\n \"game_misconduct_time\": 0,\n \"ice_hockey_goalie_order_by\": null,\n \"ice_hockey_goalie_order_by_secondary\": null,\n \"ice_hockey_goalie_order_dir\": null,\n \"ice_hockey_goalie_order_dir_secondary\": null,\n \"ice_hockey_goalie_stat_qualify_by\": null,\n \"ice_hockey_goalie_stat_qualify_val\": null,\n \"ice_hockey_skater_order_by\": null,\n \"ice_hockey_skater_order_by_secondary\": null,\n \"ice_hockey_skater_order_dir\": null,\n \"ice_hockey_skater_order_dir_secondary\": null,\n \"ice_hockey_skater_stat_qualify_by\": null,\n \"ice_hockey_skater_stat_qualify_val\": null,\n \"ice_hockey_team_scoring_order_by\": \"pts\",\n \"ice_hockey_team_scoring_order_by_secondary\": null,\n \"ice_hockey_team_scoring_order_dir\": \"desc\",\n \"ice_hockey_team_scoring_order_dir_secondary\": null,\n \"ice_hockey_team_scoring_stat_qualify_by\": null,\n \"ice_hockey_team_scoring_stat_qualify_val\": null,\n \"ice_hockey_team_stats_order_by\": null,\n \"ice_hockey_team_stats_order_by_secondary\": null,\n \"ice_hockey_team_stats_order_dir\": null,\n \"ice_hockey_team_stats_order_dir_secondary\": null,\n \"ice_hockey_team_stats_stat_qualify_by\": null,\n \"ice_hockey_team_stats_stat_qualify_val\": null,\n \"intermission_length\": 1,\n \"major_adjustment_time\": 0,\n \"major_penalty_time\": 5,\n \"match_penalty_time\": 5,\n \"max_goal_differential\": 0,\n \"max_player_major_penalties\": 2,\n \"max_player_penalties\": 5,\n \"max_team_penalties\": 15,\n \"minor_adjustment_time\": 0,\n \"minor_penalty_time\": 2,\n \"misconduct_time\": 10,\n \"overtime_intervals\": 2,\n \"overtime_length\": \"5\",\n \"post_live_updates\": true,\n \"regulation_time_intervals\": null,\n \"shootout_enabled\": false,\n \"stop_run_time\": true,\n \"time_interval_name\": \"period\",\n \"time_intervals\": [\n \"20\",\n \"20\",\n \"20\"\n ],\n \"timeout_time\": 1,\n \"timeouts\": 1,\n \"track_goal_types\": true,\n \"track_player_sog\": true,\n \"warmup_length\": 5\n },\n \"season_id\": 267440,\n \"original_scorer_can_edit\": null,\n \"force_real_time_scoring\": false,\n \"stat_tool_id\": 1848623,\n \"stats_can_be_unlinked\": null,\n \"scoring_methods\": \"--- \\n- live\\n- mass\\n- tabular\\n- quick\\n\",\n \"can_edit_final\": \"league_owner\",\n \"traded_player_stats\": null,\n \"game_sheet_auto_summary_enabled\": true,\n \"visible_stats\": \"league_xor_division\"\n },\n \"subseasons\": [\n {\n \"id\": 291621,\n \"name\": \"Regular Season\",\n \"season_id\": 267440,\n \"position\": 1,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-04-20T09:47:22-07:00\",\n \"snl_scoring_enabled\": true,\n \"statistic_grouping_id\": 417884,\n \"workers_completed\": null,\n \"standing_preference\": {\n \"id\": 110425,\n \"standing_tool_id\": 1848627,\n \"standing_type_id\": 5,\n \"standings_aggregation_level\": \"league\",\n \"qualifiers\": null,\n \"qualifier_limit\": null,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n \"winning_team_custom_points\": null,\n \"losing_team_custom_points\": null,\n \"tied_team_custom_points\": null,\n \"label_mapping\": {},\n \"extended_fields\": [\n \"win_count\",\n \"loss_count\",\n \"tie_count\",\n \"points\"\n ],\n \"order_rule\": 1,\n \"overtime_win_custom_points\": null,\n \"overtime_loss_custom_points\": null,\n \"overtime_wins_include_in_wins\": true,\n \"overtime_losses_include_in_losses\": true,\n \"legacy_custom_points\": false\n },\n \"live_scoring_stat_configuration\": {\n \"show_plus_minus\": null,\n \"fair_play_points\": false\n }\n }\n ]\n }\n ],\n \"subseason_team_instance_mapping\": [\n {\n \"subseason_id\": 291621,\n \"team_instance_id\": 1876243\n }\n ],\n \"league_name\": \"Eastern League\",\n \"site_name\": \"Sport Ngin API Demo Site\",\n \"sport_name\": \"Ice Hockey\"\n },\n ...\n]"}]},"settings":""},"createdAt":"2016-04-21T21:10:02.860Z","editedParams2":true,"isReference":true,"link_url":"","order":11,"parentDoc":null,"project":"5641217e0ee5370d00da636d","title":"Teams Index","body":"","editedParams":true,"excerpt":"The Index method returns an array of Teams matching the given parameters.\n\n###Parameters","__v":0,"hidden":false,"link_external":false,"slug":"teams-index","updates":[],"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getTeams Index
Query Params
Definition
Examples
curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/teams?site_id=11953"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/teams?site_id=11953")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.sportngin.com/teams?site_id=11953")
.get()
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.build();
Response response = client.newCall(request).execute();
curl -X GET -H "Authorization: Bearer cb2e3bd276c7fdc8e0a9989c88c032b3" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -H "Cache-Control: no-cache" -H "Postman-Token: 5021fb49-93c1-928f-6a63-f21dec82d677" "https://api.sportngin.com/teams?site_id=11953¤t_subseason_only=1"
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.sportngin.com/teams?site_id=11953¤t_subseason_only=1")
.get()
.addHeader("authorization", "Bearer cb2e3bd276c7fdc8e0a9989c88c032b3")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.addHeader("cache-control", "no-cache")
.addHeader("postman-token", "cb5b6b64-402a-3de6-6eff-cbe641ac55b2")
.build();
Response response = client.newCall(request).execute();
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.sportngin.com/teams?site_id=11953¤t_subseason_only=1")
.get()
.addHeader("authorization", "Bearer cb2e3bd276c7fdc8e0a9989c88c032b3")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.addHeader("cache-control", "no-cache")
.addHeader("postman-token", "cb5b6b64-402a-3de6-6eff-cbe641ac55b2")
.build();
Response response = client.newCall(request).execute();
Result Format
[
{
"id": 1373611,
"name": "Boston Bears",
"button_title": "Boston",
"abbrev": "Bos",
"image_id": null,
"primary_color": "000000",
"secondary_color": "000000",
"gender": "male",
"created_at": "2016-03-22T13:06:41-07:00",
"updated_at": "2016-03-23T09:34:28-07:00",
"sport_id": 1,
"opponent": null,
"parent_team_id": null,
"ios_whitelabel_url": null,
"android_whitelabel_url": null,
"sites": [
{
"id": 11953,
"domain_id": 1149,
"domain_name": "sportngin.com",
"subdomain": "apidemo",
"product_id": 14,
"name": "Sport Ngin API Demo Site",
"short_name": "Sport Ngin API Demo Site",
"created_on": "2016-02-24T06:32:26-08:00",
"updated_on": "2016-04-19T10:52:59-07:00",
"created_by_user_id": 3156422,
"updated_by_user_id": null,
"timezone": "US/Central",
"twitter_user_id": null,
"layout_theme_id": 51,
"secure_subdomain": "apidemo",
"address_id": 4447713,
"membership_privacy": "open",
"membership_grace_period": 1,
"boss_billing_account_id": null,
"boss_organization_id": 27743
}
],
"leagues": [
{
"id": 27737,
"name": "Eastern League",
"current_subseason_id": 291621,
"site_id": 11953,
"sport_id": 1,
"image_id": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-24T07:20:49-07:00",
"button_title": "Eastern",
"primary_color": "00AEEF",
"secondary_color": "666666",
"gender": "male",
"abbrev": "East",
"score_ribbon": false,
"tweet_games": null,
"game_sheet_label": "gamesheet"
}
],
"thumbnails": {},
"thumbnails_ssl": {},
"current_subseason_ids": [
291621
],
"seasons": [
{
"id": 267440,
"name": "2016",
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"solo_team_league_id": null,
"has_metadata": null,
"show_shared_schedule": false,
"stat_preference": {
"id": 292407,
"updated_on": "2016-03-22T12:46:58-07:00",
"created_on": "2016-03-22T12:46:58-07:00",
"game_defaults": {
"auto_navigate_to_play_details": true,
"field_of_play_enabled": false,
"game_misconduct_time": 0,
"ice_hockey_goalie_order_by": null,
"ice_hockey_goalie_order_by_secondary": null,
"ice_hockey_goalie_order_dir": null,
"ice_hockey_goalie_order_dir_secondary": null,
"ice_hockey_goalie_stat_qualify_by": null,
"ice_hockey_goalie_stat_qualify_val": null,
"ice_hockey_skater_order_by": null,
"ice_hockey_skater_order_by_secondary": null,
"ice_hockey_skater_order_dir": null,
"ice_hockey_skater_order_dir_secondary": null,
"ice_hockey_skater_stat_qualify_by": null,
"ice_hockey_skater_stat_qualify_val": null,
"ice_hockey_team_scoring_order_by": "pts",
"ice_hockey_team_scoring_order_by_secondary": null,
"ice_hockey_team_scoring_order_dir": "desc",
"ice_hockey_team_scoring_order_dir_secondary": null,
"ice_hockey_team_scoring_stat_qualify_by": null,
"ice_hockey_team_scoring_stat_qualify_val": null,
"ice_hockey_team_stats_order_by": null,
"ice_hockey_team_stats_order_by_secondary": null,
"ice_hockey_team_stats_order_dir": null,
"ice_hockey_team_stats_order_dir_secondary": null,
"ice_hockey_team_stats_stat_qualify_by": null,
"ice_hockey_team_stats_stat_qualify_val": null,
"intermission_length": 1,
"major_adjustment_time": 0,
"major_penalty_time": 5,
"match_penalty_time": 5,
"max_goal_differential": 0,
"max_player_major_penalties": 2,
"max_player_penalties": 5,
"max_team_penalties": 15,
"minor_adjustment_time": 0,
"minor_penalty_time": 2,
"misconduct_time": 10,
"overtime_intervals": 2,
"overtime_length": "5",
"post_live_updates": true,
"regulation_time_intervals": null,
"shootout_enabled": false,
"stop_run_time": true,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
],
"timeout_time": 1,
"timeouts": 1,
"track_goal_types": true,
"track_player_sog": true,
"warmup_length": 5
},
"season_id": 267440,
"original_scorer_can_edit": null,
"force_real_time_scoring": false,
"stat_tool_id": 1848623,
"stats_can_be_unlinked": null,
"scoring_methods": "--- \n- live\n- mass\n- tabular\n- quick\n",
"can_edit_final": "league_owner",
"traded_player_stats": null,
"game_sheet_auto_summary_enabled": true,
"visible_stats": "league_xor_division"
},
"subseasons": [
{
"id": 291621,
"name": "Regular Season",
"season_id": 267440,
"position": 1,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-04-20T09:47:22-07:00",
"snl_scoring_enabled": true,
"statistic_grouping_id": 417884,
"workers_completed": null,
"standing_preference": {
"id": 110425,
"standing_tool_id": 1848627,
"standing_type_id": 5,
"standings_aggregation_level": "league",
"qualifiers": null,
"qualifier_limit": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"winning_team_custom_points": null,
"losing_team_custom_points": null,
"tied_team_custom_points": null,
"label_mapping": {},
"extended_fields": [
"win_count",
"loss_count",
"tie_count",
"points"
],
"order_rule": 1,
"overtime_win_custom_points": null,
"overtime_loss_custom_points": null,
"overtime_wins_include_in_wins": true,
"overtime_losses_include_in_losses": true,
"legacy_custom_points": false
},
"live_scoring_stat_configuration": {
"show_plus_minus": null,
"fair_play_points": false
}
}
]
}
],
"subseason_team_instance_mapping": [
{
"subseason_id": 291621,
"team_instance_id": 1876243
}
],
"league_name": "Eastern League",
"site_name": "Sport Ngin API Demo Site",
"sport_name": "Ice Hockey"
},
]
{"_id":"571942ddac1e2e0e00183470","category":"56e03709f97d422900d63922","slug":"teams-show","type":"get","updates":[],"version":"56cca51eca43550b002813fa","order":12,"title":"Teams Show","body":"","editedParams2":true,"excerpt":"The Show method returns a single Team for a given `id`.\n\n###Parameters","githubsync":"","isReference":true,"project":"5641217e0ee5370d00da636d","sync_unique":"","createdAt":"2016-04-21T21:15:09.174Z","editedParams":true,"hidden":false,"parentDoc":null,"__v":0,"api":{"params":[{"ref":"","required":true,"desc":"Id of the team","default":"","type":"int","name":"id","in":"path","_id":"571941aaac1e2e0e00183469"}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{\n \"id\": 1373611,\n \"name\": \"Boston Bears\",\n \"button_title\": \"Boston\",\n \"abbrev\": \"Bos\",\n \"image_id\": null,\n \"primary_color\": \"000000\",\n \"secondary_color\": \"000000\",\n \"gender\": \"male\",\n \"created_at\": \"2016-03-22T13:06:41-07:00\",\n \"updated_at\": \"2016-03-23T09:34:28-07:00\",\n \"sport_id\": 1,\n \"opponent\": null,\n \"parent_team_id\": null,\n \"ios_whitelabel_url\": null,\n \"android_whitelabel_url\": null,\n \"sites\": [\n {\n \"id\": 11953,\n \"domain_id\": 1149,\n \"domain_name\": \"sportngin.com\",\n \"subdomain\": \"apidemo\",\n \"product_id\": 14,\n \"name\": \"Sport Ngin API Demo Site\",\n \"short_name\": \"Sport Ngin API Demo Site\",\n \"created_on\": \"2016-02-24T06:32:26-08:00\",\n \"updated_on\": \"2016-04-19T10:52:59-07:00\",\n \"created_by_user_id\": 3156422,\n \"updated_by_user_id\": null,\n \"timezone\": \"US/Central\",\n \"twitter_user_id\": null,\n \"layout_theme_id\": 51,\n \"secure_subdomain\": \"apidemo\",\n \"address_id\": 4447713,\n \"membership_privacy\": \"open\",\n \"membership_grace_period\": 1,\n \"boss_billing_account_id\": null,\n \"boss_organization_id\": 27743\n }\n ],\n \"leagues\": [\n {\n \"id\": 27737,\n \"name\": \"Eastern League\",\n \"current_subseason_id\": 291621,\n \"site_id\": 11953,\n \"sport_id\": 1,\n \"image_id\": null,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-24T07:20:49-07:00\",\n \"button_title\": \"Eastern\",\n \"primary_color\": \"00AEEF\",\n \"secondary_color\": \"666666\",\n \"gender\": \"male\",\n \"abbrev\": \"East\",\n \"score_ribbon\": false,\n \"tweet_games\": null,\n \"game_sheet_label\": \"gamesheet\"\n }\n ],\n \"thumbnails\": {},\n \"thumbnails_ssl\": {},\n \"current_subseason_ids\": [\n 291621\n ],\n \"seasons\": [\n {\n \"id\": 267440,\n \"name\": \"2016\",\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n \"solo_team_league_id\": null,\n \"has_metadata\": null,\n \"show_shared_schedule\": false,\n \"stat_preference\": {\n \"id\": 292407,\n \"updated_on\": \"2016-03-22T12:46:58-07:00\",\n \"created_on\": \"2016-03-22T12:46:58-07:00\",\n \"game_defaults\": {\n \"auto_navigate_to_play_details\": true,\n \"field_of_play_enabled\": false,\n \"game_misconduct_time\": 0,\n \"ice_hockey_goalie_order_by\": null,\n \"ice_hockey_goalie_order_by_secondary\": null,\n \"ice_hockey_goalie_order_dir\": null,\n \"ice_hockey_goalie_order_dir_secondary\": null,\n \"ice_hockey_goalie_stat_qualify_by\": null,\n \"ice_hockey_goalie_stat_qualify_val\": null,\n \"ice_hockey_skater_order_by\": null,\n \"ice_hockey_skater_order_by_secondary\": null,\n \"ice_hockey_skater_order_dir\": null,\n \"ice_hockey_skater_order_dir_secondary\": null,\n \"ice_hockey_skater_stat_qualify_by\": null,\n \"ice_hockey_skater_stat_qualify_val\": null,\n \"ice_hockey_team_scoring_order_by\": \"pts\",\n \"ice_hockey_team_scoring_order_by_secondary\": null,\n \"ice_hockey_team_scoring_order_dir\": \"desc\",\n \"ice_hockey_team_scoring_order_dir_secondary\": null,\n \"ice_hockey_team_scoring_stat_qualify_by\": null,\n \"ice_hockey_team_scoring_stat_qualify_val\": null,\n \"ice_hockey_team_stats_order_by\": null,\n \"ice_hockey_team_stats_order_by_secondary\": null,\n \"ice_hockey_team_stats_order_dir\": null,\n \"ice_hockey_team_stats_order_dir_secondary\": null,\n \"ice_hockey_team_stats_stat_qualify_by\": null,\n \"ice_hockey_team_stats_stat_qualify_val\": null,\n \"intermission_length\": 1,\n \"major_adjustment_time\": 0,\n \"major_penalty_time\": 5,\n \"match_penalty_time\": 5,\n \"max_goal_differential\": 0,\n \"max_player_major_penalties\": 2,\n \"max_player_penalties\": 5,\n \"max_team_penalties\": 15,\n \"minor_adjustment_time\": 0,\n \"minor_penalty_time\": 2,\n \"misconduct_time\": 10,\n \"overtime_intervals\": 2,\n \"overtime_length\": \"5\",\n \"post_live_updates\": true,\n \"regulation_time_intervals\": null,\n \"shootout_enabled\": false,\n \"stop_run_time\": true,\n \"time_interval_name\": \"period\",\n \"time_intervals\": [\n \"20\",\n \"20\",\n \"20\"\n ],\n \"timeout_time\": 1,\n \"timeouts\": 1,\n \"track_goal_types\": true,\n \"track_player_sog\": true,\n \"warmup_length\": 5\n },\n \"season_id\": 267440,\n \"original_scorer_can_edit\": null,\n \"force_real_time_scoring\": false,\n \"stat_tool_id\": 1848623,\n \"stats_can_be_unlinked\": null,\n \"scoring_methods\": \"--- \\n- live\\n- mass\\n- tabular\\n- quick\\n\",\n \"can_edit_final\": \"league_owner\",\n \"traded_player_stats\": null,\n \"game_sheet_auto_summary_enabled\": true,\n \"visible_stats\": \"league_xor_division\"\n },\n \"subseasons\": [\n {\n \"id\": 291621,\n \"name\": \"Regular Season\",\n \"season_id\": 267440,\n \"position\": 1,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-04-20T09:47:22-07:00\",\n \"snl_scoring_enabled\": true,\n \"statistic_grouping_id\": 417884,\n \"workers_completed\": null,\n \"standing_preference\": {\n \"id\": 110425,\n \"standing_tool_id\": 1848627,\n \"standing_type_id\": 5,\n \"standings_aggregation_level\": \"league\",\n \"qualifiers\": null,\n \"qualifier_limit\": null,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n \"winning_team_custom_points\": null,\n \"losing_team_custom_points\": null,\n \"tied_team_custom_points\": null,\n \"label_mapping\": {},\n \"extended_fields\": [\n \"win_count\",\n \"loss_count\",\n \"tie_count\",\n \"points\"\n ],\n \"order_rule\": 1,\n \"overtime_win_custom_points\": null,\n \"overtime_loss_custom_points\": null,\n \"overtime_wins_include_in_wins\": true,\n \"overtime_losses_include_in_losses\": true,\n \"legacy_custom_points\": false\n },\n \"live_scoring_stat_configuration\": {\n \"show_plus_minus\": null,\n \"fair_play_points\": false\n }\n }\n ]\n }\n ],\n \"subseason_team_instance_mapping\": [\n {\n \"subseason_id\": 291621,\n \"team_instance_id\": 1876243\n }\n ],\n \"league_name\": \"Eastern League\",\n \"site_name\": \"Sport Ngin API Demo Site\",\n \"sport_name\": \"Ice Hockey\",\n \"team_instances\": [\n {\n \"abbrev\": \"Bos\",\n \"affects_standings\": true,\n \"button_title\": \"Boston\",\n \"created_at\": \"2016-03-22T13:19:12-07:00\",\n \"gender\": \"male\",\n \"id\": 1876243,\n \"image_id\": null,\n \"management_team_id\": null,\n \"name\": \"Boston Bears\",\n \"opponent\": null,\n \"parent_team_instance_id\": null,\n \"primary_color\": \"000000\",\n \"roster_id\": 1837158,\n \"secondary_color\": \"000000\",\n \"team_id\": 1373611,\n \"updated_at\": \"2016-03-23T09:34:28-07:00\"\n }\n ]\n}"}]},"settings":"","url":"/teams/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/teams/1373611\""},{"code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/teams/1373611\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body","language":"ruby"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/teams/1373611\")\n .get()\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get"},"link_external":false,"link_url":"","user":"56548c568975c70d002ea4b4","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getTeams Show
Path Params
Definition
Examples
curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/teams/1373611"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/teams/1373611")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.sportngin.com/teams/1373611")
.get()
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.build();
Response response = client.newCall(request).execute();
Result Format
{
"id": 1373611,
"name": "Boston Bears",
"button_title": "Boston",
"abbrev": "Bos",
"image_id": null,
"primary_color": "000000",
"secondary_color": "000000",
"gender": "male",
"created_at": "2016-03-22T13:06:41-07:00",
"updated_at": "2016-03-23T09:34:28-07:00",
"sport_id": 1,
"opponent": null,
"parent_team_id": null,
"ios_whitelabel_url": null,
"android_whitelabel_url": null,
"sites": [
{
"id": 11953,
"domain_id": 1149,
"domain_name": "sportngin.com",
"subdomain": "apidemo",
"product_id": 14,
"name": "Sport Ngin API Demo Site",
"short_name": "Sport Ngin API Demo Site",
"created_on": "2016-02-24T06:32:26-08:00",
"updated_on": "2016-04-19T10:52:59-07:00",
"created_by_user_id": 3156422,
"updated_by_user_id": null,
"timezone": "US/Central",
"twitter_user_id": null,
"layout_theme_id": 51,
"secure_subdomain": "apidemo",
"address_id": 4447713,
"membership_privacy": "open",
"membership_grace_period": 1,
"boss_billing_account_id": null,
"boss_organization_id": 27743
}
],
"leagues": [
{
"id": 27737,
"name": "Eastern League",
"current_subseason_id": 291621,
"site_id": 11953,
"sport_id": 1,
"image_id": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-24T07:20:49-07:00",
"button_title": "Eastern",
"primary_color": "00AEEF",
"secondary_color": "666666",
"gender": "male",
"abbrev": "East",
"score_ribbon": false,
"tweet_games": null,
"game_sheet_label": "gamesheet"
}
],
"thumbnails": {},
"thumbnails_ssl": {},
"current_subseason_ids": [
291621
],
"seasons": [
{
"id": 267440,
"name": "2016",
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"solo_team_league_id": null,
"has_metadata": null,
"show_shared_schedule": false,
"stat_preference": {
"id": 292407,
"updated_on": "2016-03-22T12:46:58-07:00",
"created_on": "2016-03-22T12:46:58-07:00",
"game_defaults": {
"auto_navigate_to_play_details": true,
"field_of_play_enabled": false,
"game_misconduct_time": 0,
"ice_hockey_goalie_order_by": null,
"ice_hockey_goalie_order_by_secondary": null,
"ice_hockey_goalie_order_dir": null,
"ice_hockey_goalie_order_dir_secondary": null,
"ice_hockey_goalie_stat_qualify_by": null,
"ice_hockey_goalie_stat_qualify_val": null,
"ice_hockey_skater_order_by": null,
"ice_hockey_skater_order_by_secondary": null,
"ice_hockey_skater_order_dir": null,
"ice_hockey_skater_order_dir_secondary": null,
"ice_hockey_skater_stat_qualify_by": null,
"ice_hockey_skater_stat_qualify_val": null,
"ice_hockey_team_scoring_order_by": "pts",
"ice_hockey_team_scoring_order_by_secondary": null,
"ice_hockey_team_scoring_order_dir": "desc",
"ice_hockey_team_scoring_order_dir_secondary": null,
"ice_hockey_team_scoring_stat_qualify_by": null,
"ice_hockey_team_scoring_stat_qualify_val": null,
"ice_hockey_team_stats_order_by": null,
"ice_hockey_team_stats_order_by_secondary": null,
"ice_hockey_team_stats_order_dir": null,
"ice_hockey_team_stats_order_dir_secondary": null,
"ice_hockey_team_stats_stat_qualify_by": null,
"ice_hockey_team_stats_stat_qualify_val": null,
"intermission_length": 1,
"major_adjustment_time": 0,
"major_penalty_time": 5,
"match_penalty_time": 5,
"max_goal_differential": 0,
"max_player_major_penalties": 2,
"max_player_penalties": 5,
"max_team_penalties": 15,
"minor_adjustment_time": 0,
"minor_penalty_time": 2,
"misconduct_time": 10,
"overtime_intervals": 2,
"overtime_length": "5",
"post_live_updates": true,
"regulation_time_intervals": null,
"shootout_enabled": false,
"stop_run_time": true,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
],
"timeout_time": 1,
"timeouts": 1,
"track_goal_types": true,
"track_player_sog": true,
"warmup_length": 5
},
"season_id": 267440,
"original_scorer_can_edit": null,
"force_real_time_scoring": false,
"stat_tool_id": 1848623,
"stats_can_be_unlinked": null,
"scoring_methods": "--- \n- live\n- mass\n- tabular\n- quick\n",
"can_edit_final": "league_owner",
"traded_player_stats": null,
"game_sheet_auto_summary_enabled": true,
"visible_stats": "league_xor_division"
},
"subseasons": [
{
"id": 291621,
"name": "Regular Season",
"season_id": 267440,
"position": 1,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-04-20T09:47:22-07:00",
"snl_scoring_enabled": true,
"statistic_grouping_id": 417884,
"workers_completed": null,
"standing_preference": {
"id": 110425,
"standing_tool_id": 1848627,
"standing_type_id": 5,
"standings_aggregation_level": "league",
"qualifiers": null,
"qualifier_limit": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"winning_team_custom_points": null,
"losing_team_custom_points": null,
"tied_team_custom_points": null,
"label_mapping": {},
"extended_fields": [
"win_count",
"loss_count",
"tie_count",
"points"
],
"order_rule": 1,
"overtime_win_custom_points": null,
"overtime_loss_custom_points": null,
"overtime_wins_include_in_wins": true,
"overtime_losses_include_in_losses": true,
"legacy_custom_points": false
},
"live_scoring_stat_configuration": {
"show_plus_minus": null,
"fair_play_points": false
}
}
]
}
],
"subseason_team_instance_mapping": [
{
"subseason_id": 291621,
"team_instance_id": 1876243
}
],
"league_name": "Eastern League",
"site_name": "Sport Ngin API Demo Site",
"sport_name": "Ice Hockey",
"team_instances": [
{
"abbrev": "Bos",
"affects_standings": true,
"button_title": "Boston",
"created_at": "2016-03-22T13:19:12-07:00",
"gender": "male",
"id": 1876243,
"image_id": null,
"management_team_id": null,
"name": "Boston Bears",
"opponent": null,
"parent_team_instance_id": null,
"primary_color": "000000",
"roster_id": 1837158,
"secondary_color": "000000",
"team_id": 1373611,
"updated_at": "2016-03-23T09:34:28-07:00"
}
]
}
{"_id":"577e8f45a74eb40e00d97b61","isReference":true,"link_url":"","githubsync":"","order":13,"project":"5641217e0ee5370d00da636d","api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X PUT -H \"Authorization: Bearer ACCESS_TOKEN \" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '\n{\n \"abbrev\": \"BBB\" \n}\n' \"https://api.sportngin.com/teams/1373611\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/teams/1373611\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n \\\"team\\\":\\n {\\n \\\"abbrev\\\": \\\"BBB\\\" \\n }\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n \\\"team\\\":\\n {\\n \\\"abbrev\\\": \\\"BBB\\\" \\n }\\n}\");\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/teams/1373611\")\n .put(body)\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .addHeader(\"content-type\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"put","params":[{"_id":"577e8f45a74eb40e00d97b62","ref":"","in":"path","required":true,"desc":"Id of team to update","default":"","type":"int","name":"id"}],"results":{"codes":[{"name":"","code":"{\n \"id\": 1373611,\n \"name\": \"Boston Bears\",\n \"button_title\": \"Boston\",\n \"abbrev\": \"BBB\",\n \"image_id\": null,\n \"primary_color\": \"000000\",\n \"secondary_color\": \"000000\",\n \"gender\": \"male\",\n \"created_at\": \"2016-03-22T13:06:41-07:00\",\n \"updated_at\": \"2016-07-07T10:16:51-07:00\",\n \"sport_id\": 1,\n \"opponent\": null,\n \"parent_team_id\": null,\n \"ios_whitelabel_url\": null,\n \"android_whitelabel_url\": null,\n \"sites\": [\n {\n \"id\": 11953,\n \"domain_id\": 1149,\n \"domain_name\": \"sportngin.com\",\n \"subdomain\": \"apidemo\",\n \"product_id\": 14,\n \"name\": \"Sport Ngin API Demo Site\",\n \"short_name\": \"Sport Ngin API Demo Site\",\n \"created_on\": \"2016-02-24T06:32:26-08:00\",\n \"updated_on\": \"2016-06-02T09:24:42-07:00\",\n \"created_by_user_id\": 3156422,\n \"updated_by_user_id\": 3646297,\n \"timezone\": \"America/Chicago\",\n \"twitter_user_id\": null,\n \"layout_theme_id\": 53,\n \"secure_subdomain\": \"apidemo\",\n \"address_id\": 4447713,\n \"membership_privacy\": \"open\",\n \"membership_grace_period\": 1,\n \"boss_billing_account_id\": null,\n \"boss_organization_id\": 27743\n }\n ],\n \"leagues\": [\n {\n \"id\": 27737,\n \"name\": \"Eastern League\",\n \"current_subseason_id\": 291621,\n \"site_id\": 11953,\n \"sport_id\": 1,\n \"image_id\": null,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-05-02T13:29:58-07:00\",\n \"button_title\": \"Eastern\",\n \"primary_color\": \"00AEEF\",\n \"secondary_color\": \"666666\",\n \"gender\": \"male\",\n \"abbrev\": \"East\",\n \"score_ribbon\": false,\n \"tweet_games\": null,\n \"game_sheet_label\": \"gamesheet\"\n }\n ],\n \"thumbnails\": {},\n \"thumbnails_ssl\": {},\n \"current_subseason_ids\": [\n 291621\n ],\n \"seasons\": [\n {\n \"id\": 267440,\n...\n ],\n \"subseason_team_instance_mapping\": [\n {\n \"subseason_id\": 291621,\n \"team_instance_id\": 1876243\n },\n {\n \"subseason_id\": 302608,\n \"team_instance_id\": 1979872\n }\n ],\n \"league_name\": \"Eastern League\",\n \"site_name\": \"Sport Ngin API Demo Site\",\n \"sport_name\": \"Ice Hockey\"\n}","language":"json","status":200}]},"settings":"","url":"/teams/:id"},"body":"","slug":"teams-update","user":"56548c568975c70d002ea4b4","__v":1,"editedParams2":true,"link_external":false,"excerpt":"The Update method updates the provided fields for a given `id`.\n\n###Parameters","hidden":false,"parentDoc":null,"sync_unique":"","title":"Teams Update","category":"56e03709f97d422900d63922","createdAt":"2016-07-07T17:20:05.025Z","editedParams":true,"type":"put","updates":[],"version":"56cca51eca43550b002813fa","next":{"description":"","pages":[]},"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putTeams Update
Path Params
Definition
Examples
curl -X PUT -H "Authorization: Bearer ACCESS_TOKEN " -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -H "Content-Type: application/json" -d '
{
"abbrev": "BBB"
}
' "https://api.sportngin.com/teams/1373611"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/teams/1373611")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Put.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
request["content-type"] = 'application/json'
request.body = "{\n \"team\":\n {\n \"abbrev\": \"BBB\" \n }\n}"
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"team\":\n {\n \"abbrev\": \"BBB\" \n }\n}");
Request request = new Request.Builder()
.url("https://api.sportngin.com/teams/1373611")
.put(body)
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
Result Format
{
"id": 1373611,
"name": "Boston Bears",
"button_title": "Boston",
"abbrev": "BBB",
"image_id": null,
"primary_color": "000000",
"secondary_color": "000000",
"gender": "male",
"created_at": "2016-03-22T13:06:41-07:00",
"updated_at": "2016-07-07T10:16:51-07:00",
"sport_id": 1,
"opponent": null,
"parent_team_id": null,
"ios_whitelabel_url": null,
"android_whitelabel_url": null,
"sites": [
{
"id": 11953,
"domain_id": 1149,
"domain_name": "sportngin.com",
"subdomain": "apidemo",
"product_id": 14,
"name": "Sport Ngin API Demo Site",
"short_name": "Sport Ngin API Demo Site",
"created_on": "2016-02-24T06:32:26-08:00",
"updated_on": "2016-06-02T09:24:42-07:00",
"created_by_user_id": 3156422,
"updated_by_user_id": 3646297,
"timezone": "America/Chicago",
"twitter_user_id": null,
"layout_theme_id": 53,
"secure_subdomain": "apidemo",
"address_id": 4447713,
"membership_privacy": "open",
"membership_grace_period": 1,
"boss_billing_account_id": null,
"boss_organization_id": 27743
}
],
"leagues": [
{
"id": 27737,
"name": "Eastern League",
"current_subseason_id": 291621,
"site_id": 11953,
"sport_id": 1,
"image_id": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-05-02T13:29:58-07:00",
"button_title": "Eastern",
"primary_color": "00AEEF",
"secondary_color": "666666",
"gender": "male",
"abbrev": "East",
"score_ribbon": false,
"tweet_games": null,
"game_sheet_label": "gamesheet"
}
],
"thumbnails": {},
"thumbnails_ssl": {},
"current_subseason_ids": [
291621
],
"seasons": [
{
"id": 267440,
],
"subseason_team_instance_mapping": [
{
"subseason_id": 291621,
"team_instance_id": 1876243
},
{
"subseason_id": 302608,
"team_instance_id": 1979872
}
],
"league_name": "Eastern League",
"site_name": "Sport Ngin API Demo Site",
"sport_name": "Ice Hockey"
}
{"_id":"56d8802947b99513001f77b4","parentDoc":null,"project":"5641217e0ee5370d00da636d","api":{"url":"/team_instances","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/team_instances?subseason_id=291621\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/team_instances?subseason_id=291621\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/team_instances?subseason_id=291621\")\n .get()\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .build();\n\nResponse response = client.newCall(request).execute();","language":"java"}]},"method":"get","params":[{"_id":"56d882d2b159f10b003045fc","ref":"","in":"query","required":false,"desc":"Id of Subseason","default":"","type":"int","name":"subseason_id"},{"_id":"56d882d2b159f10b003045fb","ref":"","in":"query","required":false,"desc":"Id of LeagueInstance","default":"","type":"int","name":"league_instance_id"}],"results":{"codes":[{"name":"","code":"[\n {\n \"id\": 1876243,\n \"created_at\": \"2016-03-22T13:19:12-07:00\",\n \"updated_at\": \"2016-03-23T09:34:28-07:00\",\n \"team_id\": 1373611,\n \"affects_standings\": true,\n \"name\": \"Boston Bears\",\n \"roster_id\": 1837158,\n \"opponent\": null,\n \"parent_team_instance_id\": null,\n \"image_id\": null,\n \"abbrev\": \"Bos\",\n \"primary_color\": \"000000\",\n \"secondary_color\": \"000000\",\n \"button_title\": \"Boston\",\n \"gender\": \"male\",\n \"management_team_id\": null,\n \"team\": {\n \"id\": 1373611,\n \"name\": \"Boston Bears\",\n \"button_title\": \"Boston\",\n \"abbrev\": \"Bos\",\n \"image_id\": null,\n \"primary_color\": \"000000\",\n \"secondary_color\": \"000000\",\n \"gender\": \"male\",\n \"created_at\": \"2016-03-22T13:06:41-07:00\",\n \"updated_at\": \"2016-03-23T09:34:28-07:00\",\n \"sport_id\": 1,\n \"opponent\": null,\n \"parent_team_id\": null,\n \"ios_whitelabel_url\": null,\n \"android_whitelabel_url\": null,\n \"sites\": [\n {\n \"id\": 11953,\n \"domain_id\": 1149,\n \"domain_name\": \"sportngin.com\",\n \"subdomain\": \"apidemo\",\n \"product_id\": 14,\n \"name\": \"Sport Ngin API Demo Site\",\n \"short_name\": \"Sport Ngin API Demo Site\",\n \"created_on\": \"2016-02-24T06:32:26-08:00\",\n \"updated_on\": \"2016-04-08T10:04:54-07:00\",\n \"created_by_user_id\": 3156422,\n \"updated_by_user_id\": null,\n \"timezone\": \"US/Central\",\n \"twitter_user_id\": null,\n \"layout_theme_id\": 51,\n \"secure_subdomain\": \"apidemo\",\n \"address_id\": 4447713,\n \"membership_privacy\": \"open\",\n \"membership_grace_period\": 1,\n \"boss_billing_account_id\": null,\n \"boss_organization_id\": 27743\n }\n ],\n \"leagues\": [\n {\n \"id\": 27737,\n \"name\": \"Eastern League\",\n \"current_subseason_id\": 291621,\n \"site_id\": 11953,\n \"sport_id\": 1,\n \"image_id\": null,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-24T07:20:49-07:00\",\n \"button_title\": \"Eastern\",\n \"primary_color\": \"00AEEF\",\n \"secondary_color\": \"666666\",\n \"gender\": \"male\",\n \"abbrev\": \"East\",\n \"score_ribbon\": false,\n \"tweet_games\": null,\n \"game_sheet_label\": \"gamesheet\"\n }\n ],\n \"thumbnails\": {},\n \"thumbnails_ssl\": {},\n \"current_subseason_ids\": [\n 291621\n ],\n \"seasons\": [\n {\n \"id\": 267440,\n \"name\": \"2016\",\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n \"solo_team_league_id\": null,\n \"has_metadata\": null,\n \"show_shared_schedule\": false,\n \"stat_preference\": {\n \"id\": 292407,\n \"updated_on\": \"2016-03-22T12:46:58-07:00\",\n \"created_on\": \"2016-03-22T12:46:58-07:00\",\n \"game_defaults\": {\n \"auto_navigate_to_play_details\": true,\n \"field_of_play_enabled\": false,\n \"game_misconduct_time\": 0,\n \"ice_hockey_goalie_order_by\": null,\n \"ice_hockey_goalie_order_by_secondary\": null,\n \"ice_hockey_goalie_order_dir\": null,\n \"ice_hockey_goalie_order_dir_secondary\": null,\n \"ice_hockey_goalie_stat_qualify_by\": null,\n \"ice_hockey_goalie_stat_qualify_val\": null,\n \"ice_hockey_skater_order_by\": null,\n \"ice_hockey_skater_order_by_secondary\": null,\n \"ice_hockey_skater_order_dir\": null,\n \"ice_hockey_skater_order_dir_secondary\": null,\n \"ice_hockey_skater_stat_qualify_by\": null,\n \"ice_hockey_skater_stat_qualify_val\": null,\n \"ice_hockey_team_scoring_order_by\": \"pts\",\n \"ice_hockey_team_scoring_order_by_secondary\": null,\n \"ice_hockey_team_scoring_order_dir\": \"desc\",\n \"ice_hockey_team_scoring_order_dir_secondary\": null,\n \"ice_hockey_team_scoring_stat_qualify_by\": null,\n \"ice_hockey_team_scoring_stat_qualify_val\": null,\n \"ice_hockey_team_stats_order_by\": null,\n \"ice_hockey_team_stats_order_by_secondary\": null,\n \"ice_hockey_team_stats_order_dir\": null,\n \"ice_hockey_team_stats_order_dir_secondary\": null,\n \"ice_hockey_team_stats_stat_qualify_by\": null,\n \"ice_hockey_team_stats_stat_qualify_val\": null,\n \"intermission_length\": 1,\n \"major_adjustment_time\": 0,\n \"major_penalty_time\": 5,\n \"match_penalty_time\": 5,\n \"max_goal_differential\": 0,\n \"max_player_major_penalties\": 2,\n \"max_player_penalties\": 5,\n \"max_team_penalties\": 15,\n \"minor_adjustment_time\": 0,\n \"minor_penalty_time\": 2,\n \"misconduct_time\": 10,\n \"overtime_intervals\": 2,\n \"overtime_length\": \"5\",\n \"post_live_updates\": true,\n \"regulation_time_intervals\": null,\n \"shootout_enabled\": false,\n \"stop_run_time\": true,\n \"time_interval_name\": \"period\",\n \"time_intervals\": [\n \"20\",\n \"20\",\n \"20\"\n ],\n \"timeout_time\": 1,\n \"timeouts\": 1,\n \"track_goal_types\": true,\n \"track_player_sog\": true,\n \"warmup_length\": 5\n },\n \"season_id\": 267440,\n \"original_scorer_can_edit\": null,\n \"force_real_time_scoring\": false,\n \"stat_tool_id\": 1848623,\n \"stats_can_be_unlinked\": null,\n \"scoring_methods\": \"--- \\n- live\\n- mass\\n- tabular\\n- quick\\n\",\n \"can_edit_final\": \"league_owner\",\n \"traded_player_stats\": null,\n \"game_sheet_auto_summary_enabled\": true,\n \"visible_stats\": \"league_xor_division\"\n },\n \"subseasons\": [\n {\n \"id\": 291621,\n \"name\": \"Regular Season\",\n \"season_id\": 267440,\n \"position\": 1,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-04-15T11:02:33-07:00\",\n \"snl_scoring_enabled\": true,\n \"statistic_grouping_id\": 417884,\n \"workers_completed\": null,\n \"standing_preference\": {\n \"id\": 110425,\n \"standing_tool_id\": 1848627,\n \"standing_type_id\": 5,\n \"standings_aggregation_level\": \"league\",\n \"qualifiers\": null,\n \"qualifier_limit\": null,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n \"winning_team_custom_points\": null,\n \"losing_team_custom_points\": null,\n \"tied_team_custom_points\": null,\n \"label_mapping\": {},\n \"extended_fields\": [\n \"win_count\",\n \"loss_count\",\n \"tie_count\",\n \"points\"\n ],\n \"order_rule\": 1,\n \"overtime_win_custom_points\": null,\n \"overtime_loss_custom_points\": null,\n \"overtime_wins_include_in_wins\": true,\n \"overtime_losses_include_in_losses\": true,\n \"legacy_custom_points\": false\n },\n \"live_scoring_stat_configuration\": {\n \"show_plus_minus\": null,\n \"fair_play_points\": false\n }\n }\n ]\n }\n ],\n \"subseason_team_instance_mapping\": [\n {\n \"subseason_id\": 291621,\n \"team_instance_id\": 1876243\n }\n ],\n \"league_name\": \"Eastern League\",\n \"site_name\": \"Sport Ngin API Demo Site\",\n \"sport_name\": \"Ice Hockey\"\n },\n \"thumbnails\": {},\n \"subseason_ids\": [\n 291621\n ]\n },\n \n...\n]","language":"json","status":200}]},"settings":""},"githubsync":"","hidden":false,"link_external":false,"link_url":"","__v":4,"sync_unique":"","title":"Team Instances Index","version":"56cca51eca43550b002813fa","body":"###Attributes \n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Name\",\n \"h-1\": \"Type\",\n \"h-2\": \"Description\",\n \"0-0\": \"id\",\n \"1-0\": \"created_at\",\n \"2-0\": \"updated_at\",\n \"3-0\": \"team_id\",\n \"4-0\": \"affects_standings\",\n \"5-0\": \"name\",\n \"6-0\": \"roster_id\",\n \"7-0\": \"opponent\",\n \"8-0\": \"parent_team_instance_id\",\n \"9-0\": \"image_id\",\n \"10-0\": \"abbrev\",\n \"13-0\": \"button_title\",\n \"14-0\": \"gender\",\n \"11-0\": \"primary_color\",\n \"12-0\": \"secondary_color\",\n \"15-0\": \"team\",\n \"16-0\": \"thumbnails\",\n \"17-0\": \"subseason_ids\",\n \"0-1\": \"Integer\",\n \"0-2\": \"Id of TeamInstance\",\n \"1-1\": \"Timestamp\",\n \"2-2\": \"Timestamp of last update\",\n \"1-2\": \"Timestamp when created\",\n \"2-1\": \"Timestamp\",\n \"3-1\": \"Integer\",\n \"3-2\": \"Id of team\",\n \"4-1\": \"Boolean\",\n \"5-1\": \"String\",\n \"5-2\": \"Name of team\",\n \"6-1\": \"Integer\",\n \"6-2\": \"Id of roster that belongs to this TeamInstance\",\n \"7-1\": \"Boolean\",\n \"8-1\": \"Integer\",\n \"9-1\": \"Integer\",\n \"10-1\": \"String\",\n \"11-1\": \"String\",\n \"12-1\": \"String\",\n \"13-1\": \"String\",\n \"14-1\": \"String\",\n \"15-1\": \"Object\",\n \"16-1\": \"Object\",\n \"17-1\": \"Array\",\n \"4-2\": \"Determines if this TeamInstance affects standings for the league\",\n \"7-2\": \"Determines if this TeamInstance is an opponent for a SoloTeamLeague\",\n \"8-2\": \"If opponent is true, this is the id of the TeamInstance that this TeamInstance is an opponent of\",\n \"9-2\": \"Id of Image\",\n \"10-2\": \"Abbreviation of this TeamInstance\",\n \"11-2\": \"Primary color used in styling of team pages\",\n \"12-2\": \"Secondary color used in styling of team pages\",\n \"13-2\": \"Abbreviation of team. Used in various locations that have limited text.\",\n \"14-2\": \"Gender of team (male, female, co-ed)\",\n \"17-2\": \"Ids of Subseasons that this TeamInstance belongs to\",\n \"16-2\": \"Object with relative links to large, medium, and small thumbnails (derived)\",\n \"15-2\": \"Object representing the team irrespective of season or subseason\"\n },\n \"cols\": 3,\n \"rows\": 18\n}\n[/block]","editedParams":true,"slug":"team-instances-index","updates":[],"user":"569e96c56b4a2c0d007e9153","type":"get","category":"56e03709f97d422900d63922","createdAt":"2016-03-03T18:19:21.971Z","editedParams2":true,"excerpt":"The Index method returns an array of Team Instances matching the given parameters. This endpoint requires at least one parameter: either `subseason_id` or `league_instance_id`.\n\nA list of team instances belonging to the provided [League](https://sportnginv2.readme.io/docs/leagues) or [Subseason](https://sportnginv2.readme.io/docs/subseasons-show) is returned. An error is thrown if any of the parameters are invalid.\n\n###Parameters","isReference":true,"order":15,"next":{"description":"","pages":[]},"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getTeam Instances Index
Query Params
id
Integer
Id of TeamInstance
created_at
Timestamp
Timestamp when created
updated_at
Timestamp
Timestamp of last update
team_id
Integer
Id of team
affects_standings
Boolean
Determines if this TeamInstance affects standings for the league
name
String
Name of team
roster_id
Integer
Id of roster that belongs to this TeamInstance
opponent
Boolean
Determines if this TeamInstance is an opponent for a SoloTeamLeague
parent_team_instance_id
Integer
If opponent is true, this is the id of the TeamInstance that this TeamInstance is an opponent of
image_id
Integer
Id of Image
abbrev
String
Abbreviation of this TeamInstance
primary_color
String
Primary color used in styling of team pages
secondary_color
String
Secondary color used in styling of team pages
button_title
String
Abbreviation of team. Used in various locations that have limited text.
gender
String
Gender of team (male, female, co-ed)
team
Object
Object representing the team irrespective of season or subseason
thumbnails
Object
Object with relative links to large, medium, and small thumbnails (derived)
subseason_ids
Array
Ids of Subseasons that this TeamInstance belongs to
Definition
Examples
curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/team_instances?subseason_id=291621"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/team_instances?subseason_id=291621")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.sportngin.com/team_instances?subseason_id=291621")
.get()
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.build();
Response response = client.newCall(request).execute();
Result Format
[
{
"id": 1876243,
"created_at": "2016-03-22T13:19:12-07:00",
"updated_at": "2016-03-23T09:34:28-07:00",
"team_id": 1373611,
"affects_standings": true,
"name": "Boston Bears",
"roster_id": 1837158,
"opponent": null,
"parent_team_instance_id": null,
"image_id": null,
"abbrev": "Bos",
"primary_color": "000000",
"secondary_color": "000000",
"button_title": "Boston",
"gender": "male",
"management_team_id": null,
"team": {
"id": 1373611,
"name": "Boston Bears",
"button_title": "Boston",
"abbrev": "Bos",
"image_id": null,
"primary_color": "000000",
"secondary_color": "000000",
"gender": "male",
"created_at": "2016-03-22T13:06:41-07:00",
"updated_at": "2016-03-23T09:34:28-07:00",
"sport_id": 1,
"opponent": null,
"parent_team_id": null,
"ios_whitelabel_url": null,
"android_whitelabel_url": null,
"sites": [
{
"id": 11953,
"domain_id": 1149,
"domain_name": "sportngin.com",
"subdomain": "apidemo",
"product_id": 14,
"name": "Sport Ngin API Demo Site",
"short_name": "Sport Ngin API Demo Site",
"created_on": "2016-02-24T06:32:26-08:00",
"updated_on": "2016-04-08T10:04:54-07:00",
"created_by_user_id": 3156422,
"updated_by_user_id": null,
"timezone": "US/Central",
"twitter_user_id": null,
"layout_theme_id": 51,
"secure_subdomain": "apidemo",
"address_id": 4447713,
"membership_privacy": "open",
"membership_grace_period": 1,
"boss_billing_account_id": null,
"boss_organization_id": 27743
}
],
"leagues": [
{
"id": 27737,
"name": "Eastern League",
"current_subseason_id": 291621,
"site_id": 11953,
"sport_id": 1,
"image_id": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-24T07:20:49-07:00",
"button_title": "Eastern",
"primary_color": "00AEEF",
"secondary_color": "666666",
"gender": "male",
"abbrev": "East",
"score_ribbon": false,
"tweet_games": null,
"game_sheet_label": "gamesheet"
}
],
"thumbnails": {},
"thumbnails_ssl": {},
"current_subseason_ids": [
291621
],
"seasons": [
{
"id": 267440,
"name": "2016",
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"solo_team_league_id": null,
"has_metadata": null,
"show_shared_schedule": false,
"stat_preference": {
"id": 292407,
"updated_on": "2016-03-22T12:46:58-07:00",
"created_on": "2016-03-22T12:46:58-07:00",
"game_defaults": {
"auto_navigate_to_play_details": true,
"field_of_play_enabled": false,
"game_misconduct_time": 0,
"ice_hockey_goalie_order_by": null,
"ice_hockey_goalie_order_by_secondary": null,
"ice_hockey_goalie_order_dir": null,
"ice_hockey_goalie_order_dir_secondary": null,
"ice_hockey_goalie_stat_qualify_by": null,
"ice_hockey_goalie_stat_qualify_val": null,
"ice_hockey_skater_order_by": null,
"ice_hockey_skater_order_by_secondary": null,
"ice_hockey_skater_order_dir": null,
"ice_hockey_skater_order_dir_secondary": null,
"ice_hockey_skater_stat_qualify_by": null,
"ice_hockey_skater_stat_qualify_val": null,
"ice_hockey_team_scoring_order_by": "pts",
"ice_hockey_team_scoring_order_by_secondary": null,
"ice_hockey_team_scoring_order_dir": "desc",
"ice_hockey_team_scoring_order_dir_secondary": null,
"ice_hockey_team_scoring_stat_qualify_by": null,
"ice_hockey_team_scoring_stat_qualify_val": null,
"ice_hockey_team_stats_order_by": null,
"ice_hockey_team_stats_order_by_secondary": null,
"ice_hockey_team_stats_order_dir": null,
"ice_hockey_team_stats_order_dir_secondary": null,
"ice_hockey_team_stats_stat_qualify_by": null,
"ice_hockey_team_stats_stat_qualify_val": null,
"intermission_length": 1,
"major_adjustment_time": 0,
"major_penalty_time": 5,
"match_penalty_time": 5,
"max_goal_differential": 0,
"max_player_major_penalties": 2,
"max_player_penalties": 5,
"max_team_penalties": 15,
"minor_adjustment_time": 0,
"minor_penalty_time": 2,
"misconduct_time": 10,
"overtime_intervals": 2,
"overtime_length": "5",
"post_live_updates": true,
"regulation_time_intervals": null,
"shootout_enabled": false,
"stop_run_time": true,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
],
"timeout_time": 1,
"timeouts": 1,
"track_goal_types": true,
"track_player_sog": true,
"warmup_length": 5
},
"season_id": 267440,
"original_scorer_can_edit": null,
"force_real_time_scoring": false,
"stat_tool_id": 1848623,
"stats_can_be_unlinked": null,
"scoring_methods": "--- \n- live\n- mass\n- tabular\n- quick\n",
"can_edit_final": "league_owner",
"traded_player_stats": null,
"game_sheet_auto_summary_enabled": true,
"visible_stats": "league_xor_division"
},
"subseasons": [
{
"id": 291621,
"name": "Regular Season",
"season_id": 267440,
"position": 1,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-04-15T11:02:33-07:00",
"snl_scoring_enabled": true,
"statistic_grouping_id": 417884,
"workers_completed": null,
"standing_preference": {
"id": 110425,
"standing_tool_id": 1848627,
"standing_type_id": 5,
"standings_aggregation_level": "league",
"qualifiers": null,
"qualifier_limit": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"winning_team_custom_points": null,
"losing_team_custom_points": null,
"tied_team_custom_points": null,
"label_mapping": {},
"extended_fields": [
"win_count",
"loss_count",
"tie_count",
"points"
],
"order_rule": 1,
"overtime_win_custom_points": null,
"overtime_loss_custom_points": null,
"overtime_wins_include_in_wins": true,
"overtime_losses_include_in_losses": true,
"legacy_custom_points": false
},
"live_scoring_stat_configuration": {
"show_plus_minus": null,
"fair_play_points": false
}
}
]
}
],
"subseason_team_instance_mapping": [
{
"subseason_id": 291621,
"team_instance_id": 1876243
}
],
"league_name": "Eastern League",
"site_name": "Sport Ngin API Demo Site",
"sport_name": "Ice Hockey"
},
"thumbnails": {},
"subseason_ids": [
291621
]
},
]
{"_id":"56f1bf659c88d00e00d9e495","api":{"params":[{"name":"id","in":"path","_id":"57114eae5ba0d80e00f51614","ref":"","required":true,"desc":"Id belonging to the team_instance of interest","default":"","type":"int"}],"results":{"codes":[{"language":"json","code":"{\n \"id\": 1876243,\n \"created_at\": \"2016-03-22T13:19:12-07:00\",\n \"updated_at\": \"2016-03-23T09:34:28-07:00\",\n \"team_id\": 1373611,\n \"affects_standings\": true,\n \"name\": \"Boston Bears\",\n \"roster_id\": 1837158,\n \"opponent\": null,\n \"parent_team_instance_id\": null,\n \"image_id\": null,\n \"abbrev\": \"Bos\",\n \"primary_color\": \"000000\",\n \"secondary_color\": \"000000\",\n \"button_title\": \"Boston\",\n \"gender\": \"male\",\n \"management_team_id\": null,\n \"team\": {\n \"id\": 1373611,\n \"name\": \"Boston Bears\",\n \"button_title\": \"Boston\",\n \"abbrev\": \"Bos\",\n \"image_id\": null,\n \"primary_color\": \"000000\",\n \"secondary_color\": \"000000\",\n \"gender\": \"male\",\n \"created_at\": \"2016-03-22T13:06:41-07:00\",\n \"updated_at\": \"2016-03-23T09:34:28-07:00\",\n \"sport_id\": 1,\n \"opponent\": null,\n \"parent_team_id\": null,\n \"ios_whitelabel_url\": null,\n \"android_whitelabel_url\": null,\n \"sites\": [\n {\n \"id\": 11953,\n \"domain_id\": 1149,\n \"domain_name\": \"sportngin.com\",\n \"subdomain\": \"apidemo\",\n \"product_id\": 14,\n \"name\": \"Sport Ngin API Demo Site\",\n \"short_name\": \"Sport Ngin API Demo Site\",\n \"created_on\": \"2016-02-24T06:32:26-08:00\",\n \"updated_on\": \"2016-04-08T10:04:54-07:00\",\n \"created_by_user_id\": 3156422,\n \"updated_by_user_id\": null,\n \"timezone\": \"US/Central\",\n \"twitter_user_id\": null,\n \"layout_theme_id\": 51,\n \"secure_subdomain\": \"apidemo\",\n \"address_id\": 4447713,\n \"membership_privacy\": \"open\",\n \"membership_grace_period\": 1,\n \"boss_billing_account_id\": null,\n \"boss_organization_id\": 27743\n }\n ],\n \"leagues\": [\n {\n \"id\": 27737,\n \"name\": \"Eastern League\",\n \"current_subseason_id\": 291621,\n \"site_id\": 11953,\n \"sport_id\": 1,\n \"image_id\": null,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-24T07:20:49-07:00\",\n \"button_title\": \"Eastern\",\n \"primary_color\": \"00AEEF\",\n \"secondary_color\": \"666666\",\n \"gender\": \"male\",\n \"abbrev\": \"East\",\n \"score_ribbon\": false,\n \"tweet_games\": null,\n \"game_sheet_label\": \"gamesheet\"\n }\n ],\n \"thumbnails\": {},\n \"thumbnails_ssl\": {},\n \"current_subseason_ids\": [\n 291621\n ],\n \"seasons\": [\n {\n \"id\": 267440,\n \"name\": \"2016\",\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n \"solo_team_league_id\": null,\n \"has_metadata\": null,\n \"show_shared_schedule\": false,\n \"stat_preference\": {\n \"id\": 292407,\n \"updated_on\": \"2016-03-22T12:46:58-07:00\",\n \"created_on\": \"2016-03-22T12:46:58-07:00\",\n \"game_defaults\": {\n \"auto_navigate_to_play_details\": true,\n \"field_of_play_enabled\": false,\n \"game_misconduct_time\": 0,\n \"ice_hockey_goalie_order_by\": null,\n \"ice_hockey_goalie_order_by_secondary\": null,\n \"ice_hockey_goalie_order_dir\": null,\n \"ice_hockey_goalie_order_dir_secondary\": null,\n \"ice_hockey_goalie_stat_qualify_by\": null,\n \"ice_hockey_goalie_stat_qualify_val\": null,\n \"ice_hockey_skater_order_by\": null,\n \"ice_hockey_skater_order_by_secondary\": null,\n \"ice_hockey_skater_order_dir\": null,\n \"ice_hockey_skater_order_dir_secondary\": null,\n \"ice_hockey_skater_stat_qualify_by\": null,\n \"ice_hockey_skater_stat_qualify_val\": null,\n \"ice_hockey_team_scoring_order_by\": \"pts\",\n \"ice_hockey_team_scoring_order_by_secondary\": null,\n \"ice_hockey_team_scoring_order_dir\": \"desc\",\n \"ice_hockey_team_scoring_order_dir_secondary\": null,\n \"ice_hockey_team_scoring_stat_qualify_by\": null,\n \"ice_hockey_team_scoring_stat_qualify_val\": null,\n \"ice_hockey_team_stats_order_by\": null,\n \"ice_hockey_team_stats_order_by_secondary\": null,\n \"ice_hockey_team_stats_order_dir\": null,\n \"ice_hockey_team_stats_order_dir_secondary\": null,\n \"ice_hockey_team_stats_stat_qualify_by\": null,\n \"ice_hockey_team_stats_stat_qualify_val\": null,\n \"intermission_length\": 1,\n \"major_adjustment_time\": 0,\n \"major_penalty_time\": 5,\n \"match_penalty_time\": 5,\n \"max_goal_differential\": 0,\n \"max_player_major_penalties\": 2,\n \"max_player_penalties\": 5,\n \"max_team_penalties\": 15,\n \"minor_adjustment_time\": 0,\n \"minor_penalty_time\": 2,\n \"misconduct_time\": 10,\n \"overtime_intervals\": 2,\n \"overtime_length\": \"5\",\n \"post_live_updates\": true,\n \"regulation_time_intervals\": null,\n \"shootout_enabled\": false,\n \"stop_run_time\": true,\n \"time_interval_name\": \"period\",\n \"time_intervals\": [\n \"20\",\n \"20\",\n \"20\"\n ],\n \"timeout_time\": 1,\n \"timeouts\": 1,\n \"track_goal_types\": true,\n \"track_player_sog\": true,\n \"warmup_length\": 5\n },\n \"season_id\": 267440,\n \"original_scorer_can_edit\": null,\n \"force_real_time_scoring\": false,\n \"stat_tool_id\": 1848623,\n \"stats_can_be_unlinked\": null,\n \"scoring_methods\": \"--- \\n- live\\n- mass\\n- tabular\\n- quick\\n\",\n \"can_edit_final\": \"league_owner\",\n \"traded_player_stats\": null,\n \"game_sheet_auto_summary_enabled\": true,\n \"visible_stats\": \"league_xor_division\"\n },\n \"subseasons\": [\n {\n \"id\": 291621,\n \"name\": \"Regular Season\",\n \"season_id\": 267440,\n \"position\": 1,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-04-15T11:02:33-07:00\",\n \"snl_scoring_enabled\": true,\n \"statistic_grouping_id\": 417884,\n \"workers_completed\": null,\n \"standing_preference\": {\n \"id\": 110425,\n \"standing_tool_id\": 1848627,\n \"standing_type_id\": 5,\n \"standings_aggregation_level\": \"league\",\n \"qualifiers\": null,\n \"qualifier_limit\": null,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n \"winning_team_custom_points\": null,\n \"losing_team_custom_points\": null,\n \"tied_team_custom_points\": null,\n \"label_mapping\": {},\n \"extended_fields\": [\n \"win_count\",\n \"loss_count\",\n \"tie_count\",\n \"points\"\n ],\n \"order_rule\": 1,\n \"overtime_win_custom_points\": null,\n \"overtime_loss_custom_points\": null,\n \"overtime_wins_include_in_wins\": true,\n \"overtime_losses_include_in_losses\": true,\n \"legacy_custom_points\": false\n },\n \"live_scoring_stat_configuration\": {\n \"show_plus_minus\": null,\n \"fair_play_points\": false\n }\n }\n ]\n }\n ],\n \"subseason_team_instance_mapping\": [\n {\n \"subseason_id\": 291621,\n \"team_instance_id\": 1876243\n }\n ],\n \"league_name\": \"Eastern League\",\n \"site_name\": \"Sport Ngin API Demo Site\",\n \"sport_name\": \"Ice Hockey\"\n },\n \"thumbnails\": {},\n \"subseason_ids\": [\n 291621\n ]\n}","name":"","status":200}]},"settings":"","url":"/team_instances/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/team_instances/1876243\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/team_instances/1876243\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/team_instances/1876243\")\n .get()\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get"},"order":16,"parentDoc":null,"project":"5641217e0ee5370d00da636d","user":"56e71f9edee212320019e731","hidden":false,"version":"56cca51eca43550b002813fa","body":"###Attributes\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Attributes\",\n \"h-1\": \"Type\",\n \"h-2\": \"Notes\",\n \"0-0\": \"id\",\n \"0-1\": \"Integer\",\n \"1-0\": \"name\",\n \"1-1\": \"String\",\n \"2-0\": \"buttom_title\",\n \"2-1\": \"String\",\n \"3-0\": \"abbrev\",\n \"3-1\": \"String\",\n \"4-0\": \"image_id\",\n \"4-1\": \"Integer\",\n \"5-0\": \"primary_color\",\n \"5-1\": \"String\",\n \"6-0\": \"secondary_color\",\n \"6-1\": \"String\",\n \"7-0\": \"thumbnails\",\n \"7-1\": \"Array of Strings\",\n \"7-2\": \"derived field. thumbnails of the team logo\",\n \"8-0\": \"created_at\",\n \"8-1\": \"Datetime\",\n \"9-0\": \"Uploaded_at\",\n \"9-1\": \"Datetime\",\n \"10-0\": \"thumbnails\",\n \"10-1\": \"Hash\",\n \"10-2\": \"A hash of the thumbnail urls. Keys: small, medium, and large\",\n \"0-2\": \"Unique id assigned by NGIN\",\n \"1-2\": \"Name of the team\",\n \"2-2\": \"Version of team name that displays on buttons and links\",\n \"3-2\": \"Abbreviation of the team name\",\n \"4-2\": \"ID of the team image\",\n \"5-2\": \"Hex code of the team's primary color\",\n \"6-2\": \"Hex code of the team's secondary color\",\n \"8-2\": \"Timestamp of creation date\",\n \"9-2\": \"Timestamp of last update\",\n \"11-0\": \"roster_id\",\n \"11-1\": \"Integer\",\n \"11-2\": \"id of the roster assigned by NGIN\",\n \"12-0\": \"team_id\",\n \"12-1\": \"Integer\",\n \"12-2\": \"id of the team assigned by NGIN\",\n \"13-0\": \"affects_standings\",\n \"13-1\": \"Boolean\",\n \"13-2\": \"Determines if this teams games affect overall league/division standings\",\n \"14-0\": \"team\",\n \"14-1\": \"Hash\",\n \"14-2\": \"team data\"\n },\n \"cols\": 3,\n \"rows\": 15\n}\n[/block]","createdAt":"2016-03-22T21:55:49.983Z","editedParams":true,"excerpt":"The Show method returns a single Team Instance for a given `id`.\n\n###Parameters","type":"get","__v":8,"category":"56e03709f97d422900d63922","githubsync":"","link_url":"","slug":"team-instances-show","updates":[],"editedParams2":true,"isReference":true,"link_external":false,"sync_unique":"","title":"Team Instances Show","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getTeam Instances Show
Path Params
id
Integer
Unique id assigned by NGIN
name
String
Name of the team
buttom_title
String
Version of team name that displays on buttons and links
abbrev
String
Abbreviation of the team name
image_id
Integer
ID of the team image
primary_color
String
Hex code of the team's primary color
secondary_color
String
Hex code of the team's secondary color
thumbnails
Array of Strings
derived field. thumbnails of the team logo
created_at
Datetime
Timestamp of creation date
Uploaded_at
Datetime
Timestamp of last update
thumbnails
Hash
A hash of the thumbnail urls. Keys: small, medium, and large
roster_id
Integer
id of the roster assigned by NGIN
team_id
Integer
id of the team assigned by NGIN
affects_standings
Boolean
Determines if this teams games affect overall league/division standings
team
Hash
team data
Definition
Examples
curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/team_instances/1876243"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/team_instances/1876243")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.sportngin.com/team_instances/1876243")
.get()
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.build();
Response response = client.newCall(request).execute();
Result Format
{
"id": 1876243,
"created_at": "2016-03-22T13:19:12-07:00",
"updated_at": "2016-03-23T09:34:28-07:00",
"team_id": 1373611,
"affects_standings": true,
"name": "Boston Bears",
"roster_id": 1837158,
"opponent": null,
"parent_team_instance_id": null,
"image_id": null,
"abbrev": "Bos",
"primary_color": "000000",
"secondary_color": "000000",
"button_title": "Boston",
"gender": "male",
"management_team_id": null,
"team": {
"id": 1373611,
"name": "Boston Bears",
"button_title": "Boston",
"abbrev": "Bos",
"image_id": null,
"primary_color": "000000",
"secondary_color": "000000",
"gender": "male",
"created_at": "2016-03-22T13:06:41-07:00",
"updated_at": "2016-03-23T09:34:28-07:00",
"sport_id": 1,
"opponent": null,
"parent_team_id": null,
"ios_whitelabel_url": null,
"android_whitelabel_url": null,
"sites": [
{
"id": 11953,
"domain_id": 1149,
"domain_name": "sportngin.com",
"subdomain": "apidemo",
"product_id": 14,
"name": "Sport Ngin API Demo Site",
"short_name": "Sport Ngin API Demo Site",
"created_on": "2016-02-24T06:32:26-08:00",
"updated_on": "2016-04-08T10:04:54-07:00",
"created_by_user_id": 3156422,
"updated_by_user_id": null,
"timezone": "US/Central",
"twitter_user_id": null,
"layout_theme_id": 51,
"secure_subdomain": "apidemo",
"address_id": 4447713,
"membership_privacy": "open",
"membership_grace_period": 1,
"boss_billing_account_id": null,
"boss_organization_id": 27743
}
],
"leagues": [
{
"id": 27737,
"name": "Eastern League",
"current_subseason_id": 291621,
"site_id": 11953,
"sport_id": 1,
"image_id": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-24T07:20:49-07:00",
"button_title": "Eastern",
"primary_color": "00AEEF",
"secondary_color": "666666",
"gender": "male",
"abbrev": "East",
"score_ribbon": false,
"tweet_games": null,
"game_sheet_label": "gamesheet"
}
],
"thumbnails": {},
"thumbnails_ssl": {},
"current_subseason_ids": [
291621
],
"seasons": [
{
"id": 267440,
"name": "2016",
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"solo_team_league_id": null,
"has_metadata": null,
"show_shared_schedule": false,
"stat_preference": {
"id": 292407,
"updated_on": "2016-03-22T12:46:58-07:00",
"created_on": "2016-03-22T12:46:58-07:00",
"game_defaults": {
"auto_navigate_to_play_details": true,
"field_of_play_enabled": false,
"game_misconduct_time": 0,
"ice_hockey_goalie_order_by": null,
"ice_hockey_goalie_order_by_secondary": null,
"ice_hockey_goalie_order_dir": null,
"ice_hockey_goalie_order_dir_secondary": null,
"ice_hockey_goalie_stat_qualify_by": null,
"ice_hockey_goalie_stat_qualify_val": null,
"ice_hockey_skater_order_by": null,
"ice_hockey_skater_order_by_secondary": null,
"ice_hockey_skater_order_dir": null,
"ice_hockey_skater_order_dir_secondary": null,
"ice_hockey_skater_stat_qualify_by": null,
"ice_hockey_skater_stat_qualify_val": null,
"ice_hockey_team_scoring_order_by": "pts",
"ice_hockey_team_scoring_order_by_secondary": null,
"ice_hockey_team_scoring_order_dir": "desc",
"ice_hockey_team_scoring_order_dir_secondary": null,
"ice_hockey_team_scoring_stat_qualify_by": null,
"ice_hockey_team_scoring_stat_qualify_val": null,
"ice_hockey_team_stats_order_by": null,
"ice_hockey_team_stats_order_by_secondary": null,
"ice_hockey_team_stats_order_dir": null,
"ice_hockey_team_stats_order_dir_secondary": null,
"ice_hockey_team_stats_stat_qualify_by": null,
"ice_hockey_team_stats_stat_qualify_val": null,
"intermission_length": 1,
"major_adjustment_time": 0,
"major_penalty_time": 5,
"match_penalty_time": 5,
"max_goal_differential": 0,
"max_player_major_penalties": 2,
"max_player_penalties": 5,
"max_team_penalties": 15,
"minor_adjustment_time": 0,
"minor_penalty_time": 2,
"misconduct_time": 10,
"overtime_intervals": 2,
"overtime_length": "5",
"post_live_updates": true,
"regulation_time_intervals": null,
"shootout_enabled": false,
"stop_run_time": true,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
],
"timeout_time": 1,
"timeouts": 1,
"track_goal_types": true,
"track_player_sog": true,
"warmup_length": 5
},
"season_id": 267440,
"original_scorer_can_edit": null,
"force_real_time_scoring": false,
"stat_tool_id": 1848623,
"stats_can_be_unlinked": null,
"scoring_methods": "--- \n- live\n- mass\n- tabular\n- quick\n",
"can_edit_final": "league_owner",
"traded_player_stats": null,
"game_sheet_auto_summary_enabled": true,
"visible_stats": "league_xor_division"
},
"subseasons": [
{
"id": 291621,
"name": "Regular Season",
"season_id": 267440,
"position": 1,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-04-15T11:02:33-07:00",
"snl_scoring_enabled": true,
"statistic_grouping_id": 417884,
"workers_completed": null,
"standing_preference": {
"id": 110425,
"standing_tool_id": 1848627,
"standing_type_id": 5,
"standings_aggregation_level": "league",
"qualifiers": null,
"qualifier_limit": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"winning_team_custom_points": null,
"losing_team_custom_points": null,
"tied_team_custom_points": null,
"label_mapping": {},
"extended_fields": [
"win_count",
"loss_count",
"tie_count",
"points"
],
"order_rule": 1,
"overtime_win_custom_points": null,
"overtime_loss_custom_points": null,
"overtime_wins_include_in_wins": true,
"overtime_losses_include_in_losses": true,
"legacy_custom_points": false
},
"live_scoring_stat_configuration": {
"show_plus_minus": null,
"fair_play_points": false
}
}
]
}
],
"subseason_team_instance_mapping": [
{
"subseason_id": 291621,
"team_instance_id": 1876243
}
],
"league_name": "Eastern League",
"site_name": "Sport Ngin API Demo Site",
"sport_name": "Ice Hockey"
},
"thumbnails": {},
"subseason_ids": [
291621
]
}
{"_id":"56e0470f4685db1700d947ca","link_external":false,"title":"Team Instances Create","githubsync":"","hidden":false,"isReference":true,"slug":"team-instances-create","version":"56cca51eca43550b002813fa","__v":10,"api":{"examples":{"codes":[{"name":"cURL - New Team","code":"curl -X POST -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n \"parent_node_id\": 2458074,\n \"existing_or_new\": \"new\",\n \"top_new_team_template_id\": 23220,\n \"bottom_new_team_template_id\": 23221,\n \"team\":\n {\n \"name\": \"API TEST TEAM\",\n \"button_title\": \"API TEAM\",\n \"abbrev\": \"ATT\",\n \"primary_color\": \"FFFFFF\",\n \"secondary_color\": \"AAAAAA\"\n }\n}\n ' \"https://api.sportngin.com/team_instances?subseason_id=291621\"","language":"curl"},{"name":"Ruby - New Team","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/team_instances?subseason_id=291621\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n \\\"parent_node_id\\\": 2458074,\\n \\\"existing_or_new\\\": \\\"new\\\",\\n \\\"team\\\":\\n {\\n \\\"name\\\": \\\"API TEST TEAM\\\",\\n \\\"button_title\\\": \\\"API TEAM\\\",\\n \\\"abbrev\\\": \\\"ATT\\\",\\n \\\"primary_color\\\": \\\"FFFFFF\\\",\\n \\\"secondary_color\\\": \\\"AAAAAA\\\"\\n }\\n}\\n \"\n\nresponse = http.request(request)\nputs response.read_body","language":"ruby"},{"name":"Java - New Team","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n \\\"parent_node_id\\\": 2458074,\\n \\\"existing_or_new\\\": \\\"new\\\",\\n \\\"team\\\":\\n {\\n \\\"name\\\": \\\"API TEST TEAM\\\",\\n \\\"button_title\\\": \\\"API TEAM\\\",\\n \\\"abbrev\\\": \\\"ATT\\\",\\n \\\"primary_color\\\": \\\"FFFFFF\\\",\\n \\\"secondary_color\\\": \\\"AAAAAA\\\"\\n }\\n}\\n \");\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/team_instances?subseason_id=291621\")\n .post(body)\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .addHeader(\"content-type\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();","language":"java"},{"name":"cURL - Existing Team","code":"curl -X POST -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n {\n \"parent_node_id\": 2458074,\n \"top_existing_team_template_id\": 23220,\n \"bottom_existing_team_template_id\": 23220,\n \"node\":\n {\n \"team_id\": 1373611\n }\n}\n ' \"https://api.sportngin.com/team_instances?subseason_id=291621\"","language":"curl"},{"code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/team_instances?subseason_id=291621\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n \\\"parent_node_id\\\": 2458074,\\n \\\"top_existing_team_template_id\\\": 23220,\\n \\\"bottom_existing_team_template_id\\\": 23221,\\n \\\"node\\\":\\n {\\n \\\"team_id\\\": 1373611,\\n}\\n}\\n \"\n\nresponse = http.request(request)\nputs response.read_body","language":"ruby","name":"Ruby - Existing Team"},{"name":"Java - Existing Team","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n \\\"parent_node_id\\\": 2458074,\\n \\\"top_existing_team_template_id\\\": 23220,\\n \\\"bottom_existing_team_template_id\\\": 23221,\\n \\\"node\\\":\\n {\\n \\\"team_id\\\": 1373611,\\n}\\n}\\n \");\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/team_instances?subseason_id=291621\")\n .post(body)\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .addHeader(\"content-type\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();","language":"java"}]},"method":"post","params":[{"in":"path","required":true,"desc":"","default":"","type":"int","name":"subseason_id","_id":"57eeac5ecc36920e00bff4b9","ref":""},{"desc":"","default":"","type":"int","name":"league_instance_id","_id":"57eeac5ecc36920e00bff4b8","ref":"","in":"path","required":true},{"_id":"58867c1d9321a50f00f3eb13","default":"","desc":"ID of the node beneath which the team will be placed","in":"body","name":"parent_node_id","ref":"","required":true,"type":"int"},{"name":"existing_or_new","_id":"58867c1d9321a50f00f3eb12","ref":"","in":"body","required":true,"desc":"Denotes whether the new Team Instance will be created under a new or existing Team","default":"existing","type":"string"},{"type":"int","name":"top_new_team_template_id","_id":"58867c1d9321a50f00f3eb11","ref":"","in":"body","required":false,"desc":"Top template for team page if new team","default":""},{"desc":"Top template for team page if existing team","default":"","type":"int","name":"top_existing_team_template_id","_id":"58867c1d9321a50f00f3eb10","ref":"","in":"body","required":false},{"_id":"58867c1d9321a50f00f3eb0f","ref":"","in":"body","required":false,"desc":"Bottom template for team page if new team","default":"","type":"int","name":"bottom_new_team_template_id"},{"_id":"58867c1d9321a50f00f3eb0e","ref":"","in":"body","required":false,"desc":"Bottom template for team page if existing team","default":"","type":"int","name":"bottom_existing_team_template_id"},{"_id":"58867c1d9321a50f00f3eb0d","ref":"","in":"body","required":false,"desc":"ID of Team of which to create new instance of","default":"","type":"int","name":"node[team_id]"},{"_id":"58867c1d9321a50f00f3eb0c","ref":"","in":"body","required":false,"desc":"Name of team if team does not already exist","default":"","type":"string","name":"team[name]"},{"_id":"58867c1d9321a50f00f3eb0b","ref":"","in":"body","required":false,"desc":"Button title of team if team does not already exist","default":"","type":"string","name":"team[button_title]"},{"name":"team[abbrev]","_id":"58867c1d9321a50f00f3eb0a","ref":"","in":"body","required":false,"desc":"Abbreviation of team name if team does not already exist","default":"","type":"string"},{"ref":"","in":"body","required":false,"desc":"Team primary color if team does not already exist","default":"","type":"string","name":"team[primary_color]","_id":"58867c1d9321a50f00f3eb09"},{"default":"","type":"string","name":"team[secondary_color]","_id":"58867c1d9321a50f00f3eb08","ref":"","in":"body","required":false,"desc":"Team secondary color if team does not already exist"}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{\n \"id\": 1930618,\n \"created_at\": \"2016-04-22T09:00:25-07:00\",\n \"updated_at\": \"2016-04-22T09:00:25-07:00\",\n \"team_id\": 1413546,\n \"affects_standings\": true,\n \"name\": \"API TEST TEAM\",\n \"roster_id\": 1892176,\n \"opponent\": null,\n \"parent_team_instance_id\": null,\n \"image_id\": null,\n \"abbrev\": \"ATT\",\n \"primary_color\": \"FFFFFF\",\n \"secondary_color\": \"AAAAAA\",\n \"button_title\": \"API TEAM\",\n \"gender\": \"male\",\n \"management_team_id\": null,\n \"team\": {\n \"id\": 1413546,\n \"name\": \"API TEST TEAM\",\n \"button_title\": \"API TEAM\",\n \"abbrev\": \"ATT\",\n \"image_id\": null,\n \"primary_color\": \"FFFFFF\",\n \"secondary_color\": \"AAAAAA\",\n \"gender\": null,\n \"created_at\": \"2016-04-22T09:00:25-07:00\",\n \"updated_at\": \"2016-04-22T09:00:25-07:00\",\n \"sport_id\": 1,\n \"opponent\": null,\n \"parent_team_id\": null,\n \"ios_whitelabel_url\": null,\n \"android_whitelabel_url\": null,\n \"sites\": [\n {\n \"id\": 11953,\n \"domain_id\": 1149,\n \"domain_name\": \"sportngin.com\",\n \"subdomain\": \"apidemo\",\n \"product_id\": 14,\n \"name\": \"Sport Ngin API Demo Site\",\n \"short_name\": \"Sport Ngin API Demo Site\",\n \"created_on\": \"2016-02-24T06:32:26-08:00\",\n \"updated_on\": \"2016-04-08T10:04:54-07:00\",\n \"created_by_user_id\": 3156422,\n \"updated_by_user_id\": null,\n \"timezone\": \"US/Central\",\n \"twitter_user_id\": null,\n \"layout_theme_id\": 51,\n \"secure_subdomain\": \"apidemo\",\n \"address_id\": 4447713,\n \"membership_privacy\": \"open\",\n \"membership_grace_period\": 1,\n \"boss_billing_account_id\": null,\n \"boss_organization_id\": 27743\n }\n ],\n \"leagues\": [\n {\n \"id\": 27737,\n \"name\": \"Eastern League\",\n \"current_subseason_id\": 291621,\n \"site_id\": 11953,\n \"sport_id\": 1,\n \"image_id\": null,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-24T07:20:49-07:00\",\n \"button_title\": \"Eastern\",\n \"primary_color\": \"00AEEF\",\n \"secondary_color\": \"666666\",\n \"gender\": \"male\",\n \"abbrev\": \"East\",\n \"score_ribbon\": false,\n \"tweet_games\": null,\n \"game_sheet_label\": \"gamesheet\"\n }\n ],\n \"thumbnails\": {},\n \"thumbnails_ssl\": {},\n \"current_subseason_ids\": [\n 291621\n ],\n \"seasons\": [\n {\n \"id\": 267440,\n \"name\": \"2016\",\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n \"solo_team_league_id\": null,\n \"has_metadata\": null,\n \"show_shared_schedule\": false,\n \"stat_preference\": {\n \"id\": 292407,\n \"updated_on\": \"2016-03-22T12:46:58-07:00\",\n \"created_on\": \"2016-03-22T12:46:58-07:00\",\n \"game_defaults\": {\n \"auto_navigate_to_play_details\": true,\n \"field_of_play_enabled\": false,\n \"game_misconduct_time\": 0,\n \"ice_hockey_goalie_order_by\": null,\n \"ice_hockey_goalie_order_by_secondary\": null,\n \"ice_hockey_goalie_order_dir\": null,\n \"ice_hockey_goalie_order_dir_secondary\": null,\n \"ice_hockey_goalie_stat_qualify_by\": null,\n \"ice_hockey_goalie_stat_qualify_val\": null,\n \"ice_hockey_skater_order_by\": null,\n \"ice_hockey_skater_order_by_secondary\": null,\n \"ice_hockey_skater_order_dir\": null,\n \"ice_hockey_skater_order_dir_secondary\": null,\n \"ice_hockey_skater_stat_qualify_by\": null,\n \"ice_hockey_skater_stat_qualify_val\": null,\n \"ice_hockey_team_scoring_order_by\": \"pts\",\n \"ice_hockey_team_scoring_order_by_secondary\": null,\n \"ice_hockey_team_scoring_order_dir\": \"desc\",\n \"ice_hockey_team_scoring_order_dir_secondary\": null,\n \"ice_hockey_team_scoring_stat_qualify_by\": null,\n \"ice_hockey_team_scoring_stat_qualify_val\": null,\n \"ice_hockey_team_stats_order_by\": null,\n \"ice_hockey_team_stats_order_by_secondary\": null,\n \"ice_hockey_team_stats_order_dir\": null,\n \"ice_hockey_team_stats_order_dir_secondary\": null,\n \"ice_hockey_team_stats_stat_qualify_by\": null,\n \"ice_hockey_team_stats_stat_qualify_val\": null,\n \"intermission_length\": 1,\n \"major_adjustment_time\": 0,\n \"major_penalty_time\": 5,\n \"match_penalty_time\": 5,\n \"max_goal_differential\": 0,\n \"max_player_major_penalties\": 2,\n \"max_player_penalties\": 5,\n \"max_team_penalties\": 15,\n \"minor_adjustment_time\": 0,\n \"minor_penalty_time\": 2,\n \"misconduct_time\": 10,\n \"overtime_intervals\": 2,\n \"overtime_length\": \"5\",\n \"post_live_updates\": true,\n \"regulation_time_intervals\": null,\n \"shootout_enabled\": false,\n \"stop_run_time\": true,\n \"time_interval_name\": \"period\",\n \"time_intervals\": [\n \"20\",\n \"20\",\n \"20\"\n ],\n \"timeout_time\": 1,\n \"timeouts\": 1,\n \"track_goal_types\": true,\n \"track_player_sog\": true,\n \"warmup_length\": 5\n },\n \"season_id\": 267440,\n \"original_scorer_can_edit\": null,\n \"force_real_time_scoring\": false,\n \"stat_tool_id\": 1848623,\n \"stats_can_be_unlinked\": null,\n \"scoring_methods\": \"--- \\n- live\\n- mass\\n- tabular\\n- quick\\n\",\n \"can_edit_final\": \"league_owner\",\n \"traded_player_stats\": null,\n \"game_sheet_auto_summary_enabled\": true,\n \"visible_stats\": \"league_xor_division\"\n },\n \"subseasons\": [\n {\n \"id\": 291621,\n \"name\": \"Regular Season\",\n \"season_id\": 267440,\n \"position\": 1,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-04-20T11:53:00-07:00\",\n \"snl_scoring_enabled\": true,\n \"statistic_grouping_id\": 417884,\n \"workers_completed\": null,\n \"standing_preference\": {\n \"id\": 110425,\n \"standing_tool_id\": 1848627,\n \"standing_type_id\": 5,\n \"standings_aggregation_level\": \"league\",\n \"qualifiers\": null,\n \"qualifier_limit\": null,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n \"winning_team_custom_points\": null,\n \"losing_team_custom_points\": null,\n \"tied_team_custom_points\": null,\n \"label_mapping\": {},\n \"extended_fields\": [\n \"win_count\",\n \"loss_count\",\n \"tie_count\",\n \"points\"\n ],\n \"order_rule\": 1,\n \"overtime_win_custom_points\": null,\n \"overtime_loss_custom_points\": null,\n \"overtime_wins_include_in_wins\": true,\n \"overtime_losses_include_in_losses\": true,\n \"legacy_custom_points\": false\n },\n \"live_scoring_stat_configuration\": {\n \"show_plus_minus\": null,\n \"fair_play_points\": false\n }\n }\n ]\n }\n ],\n \"subseason_team_instance_mapping\": [\n {\n \"subseason_id\": 291621,\n \"team_instance_id\": 1930618\n }\n ],\n \"league_name\": \"Eastern League\",\n \"site_name\": \"Sport Ngin API Demo Site\",\n \"sport_name\": \"Ice Hockey\"\n },\n \"thumbnails\": {},\n \"subseason_ids\": [\n 291621\n ]\n}"}]},"settings":"","url":"/team_instances","auth":"required"},"category":"56e03709f97d422900d63922","order":17,"link_url":"","parentDoc":null,"type":"post","updates":[],"body":"","createdAt":"2016-03-09T15:53:51.431Z","editedParams":true,"excerpt":"The Create method accepts a single Team Instance (see attributes above) and creates a new record in SportsEngine. This endpoint requires at least one parameter: either `subseason_id` or `league_instance_id`.\n\n###Parameters","user":"56548c568975c70d002ea4b4","editedParams2":true,"next":{"description":"","pages":[]},"project":"5641217e0ee5370d00da636d","sync_unique":"","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postTeam Instances Create
Path Params
Body Params
Definition
Examples
curl -X POST -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -H "Content-Type: application/json" -d '{
"parent_node_id": 2458074,
"existing_or_new": "new",
"top_new_team_template_id": 23220,
"bottom_new_team_template_id": 23221,
"team":
{
"name": "API TEST TEAM",
"button_title": "API TEAM",
"abbrev": "ATT",
"primary_color": "FFFFFF",
"secondary_color": "AAAAAA"
}
}
' "https://api.sportngin.com/team_instances?subseason_id=291621"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/team_instances?subseason_id=291621")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
request["content-type"] = 'application/json'
request.body = "{\n \"parent_node_id\": 2458074,\n \"existing_or_new\": \"new\",\n \"team\":\n {\n \"name\": \"API TEST TEAM\",\n \"button_title\": \"API TEAM\",\n \"abbrev\": \"ATT\",\n \"primary_color\": \"FFFFFF\",\n \"secondary_color\": \"AAAAAA\"\n }\n}\n "
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"parent_node_id\": 2458074,\n \"existing_or_new\": \"new\",\n \"team\":\n {\n \"name\": \"API TEST TEAM\",\n \"button_title\": \"API TEAM\",\n \"abbrev\": \"ATT\",\n \"primary_color\": \"FFFFFF\",\n \"secondary_color\": \"AAAAAA\"\n }\n}\n ");
Request request = new Request.Builder()
.url("https://api.sportngin.com/team_instances?subseason_id=291621")
.post(body)
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
curl -X POST -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -H "Content-Type: application/json" -d '{
{
"parent_node_id": 2458074,
"top_existing_team_template_id": 23220,
"bottom_existing_team_template_id": 23220,
"node":
{
"team_id": 1373611
}
}
' "https://api.sportngin.com/team_instances?subseason_id=291621"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/team_instances?subseason_id=291621")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
request["content-type"] = 'application/json'
request.body = "{\n \"parent_node_id\": 2458074,\n \"top_existing_team_template_id\": 23220,\n \"bottom_existing_team_template_id\": 23221,\n \"node\":\n {\n \"team_id\": 1373611,\n}\n}\n "
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"parent_node_id\": 2458074,\n \"top_existing_team_template_id\": 23220,\n \"bottom_existing_team_template_id\": 23221,\n \"node\":\n {\n \"team_id\": 1373611,\n}\n}\n ");
Request request = new Request.Builder()
.url("https://api.sportngin.com/team_instances?subseason_id=291621")
.post(body)
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
Result Format
{
"id": 1930618,
"created_at": "2016-04-22T09:00:25-07:00",
"updated_at": "2016-04-22T09:00:25-07:00",
"team_id": 1413546,
"affects_standings": true,
"name": "API TEST TEAM",
"roster_id": 1892176,
"opponent": null,
"parent_team_instance_id": null,
"image_id": null,
"abbrev": "ATT",
"primary_color": "FFFFFF",
"secondary_color": "AAAAAA",
"button_title": "API TEAM",
"gender": "male",
"management_team_id": null,
"team": {
"id": 1413546,
"name": "API TEST TEAM",
"button_title": "API TEAM",
"abbrev": "ATT",
"image_id": null,
"primary_color": "FFFFFF",
"secondary_color": "AAAAAA",
"gender": null,
"created_at": "2016-04-22T09:00:25-07:00",
"updated_at": "2016-04-22T09:00:25-07:00",
"sport_id": 1,
"opponent": null,
"parent_team_id": null,
"ios_whitelabel_url": null,
"android_whitelabel_url": null,
"sites": [
{
"id": 11953,
"domain_id": 1149,
"domain_name": "sportngin.com",
"subdomain": "apidemo",
"product_id": 14,
"name": "Sport Ngin API Demo Site",
"short_name": "Sport Ngin API Demo Site",
"created_on": "2016-02-24T06:32:26-08:00",
"updated_on": "2016-04-08T10:04:54-07:00",
"created_by_user_id": 3156422,
"updated_by_user_id": null,
"timezone": "US/Central",
"twitter_user_id": null,
"layout_theme_id": 51,
"secure_subdomain": "apidemo",
"address_id": 4447713,
"membership_privacy": "open",
"membership_grace_period": 1,
"boss_billing_account_id": null,
"boss_organization_id": 27743
}
],
"leagues": [
{
"id": 27737,
"name": "Eastern League",
"current_subseason_id": 291621,
"site_id": 11953,
"sport_id": 1,
"image_id": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-24T07:20:49-07:00",
"button_title": "Eastern",
"primary_color": "00AEEF",
"secondary_color": "666666",
"gender": "male",
"abbrev": "East",
"score_ribbon": false,
"tweet_games": null,
"game_sheet_label": "gamesheet"
}
],
"thumbnails": {},
"thumbnails_ssl": {},
"current_subseason_ids": [
291621
],
"seasons": [
{
"id": 267440,
"name": "2016",
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"solo_team_league_id": null,
"has_metadata": null,
"show_shared_schedule": false,
"stat_preference": {
"id": 292407,
"updated_on": "2016-03-22T12:46:58-07:00",
"created_on": "2016-03-22T12:46:58-07:00",
"game_defaults": {
"auto_navigate_to_play_details": true,
"field_of_play_enabled": false,
"game_misconduct_time": 0,
"ice_hockey_goalie_order_by": null,
"ice_hockey_goalie_order_by_secondary": null,
"ice_hockey_goalie_order_dir": null,
"ice_hockey_goalie_order_dir_secondary": null,
"ice_hockey_goalie_stat_qualify_by": null,
"ice_hockey_goalie_stat_qualify_val": null,
"ice_hockey_skater_order_by": null,
"ice_hockey_skater_order_by_secondary": null,
"ice_hockey_skater_order_dir": null,
"ice_hockey_skater_order_dir_secondary": null,
"ice_hockey_skater_stat_qualify_by": null,
"ice_hockey_skater_stat_qualify_val": null,
"ice_hockey_team_scoring_order_by": "pts",
"ice_hockey_team_scoring_order_by_secondary": null,
"ice_hockey_team_scoring_order_dir": "desc",
"ice_hockey_team_scoring_order_dir_secondary": null,
"ice_hockey_team_scoring_stat_qualify_by": null,
"ice_hockey_team_scoring_stat_qualify_val": null,
"ice_hockey_team_stats_order_by": null,
"ice_hockey_team_stats_order_by_secondary": null,
"ice_hockey_team_stats_order_dir": null,
"ice_hockey_team_stats_order_dir_secondary": null,
"ice_hockey_team_stats_stat_qualify_by": null,
"ice_hockey_team_stats_stat_qualify_val": null,
"intermission_length": 1,
"major_adjustment_time": 0,
"major_penalty_time": 5,
"match_penalty_time": 5,
"max_goal_differential": 0,
"max_player_major_penalties": 2,
"max_player_penalties": 5,
"max_team_penalties": 15,
"minor_adjustment_time": 0,
"minor_penalty_time": 2,
"misconduct_time": 10,
"overtime_intervals": 2,
"overtime_length": "5",
"post_live_updates": true,
"regulation_time_intervals": null,
"shootout_enabled": false,
"stop_run_time": true,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
],
"timeout_time": 1,
"timeouts": 1,
"track_goal_types": true,
"track_player_sog": true,
"warmup_length": 5
},
"season_id": 267440,
"original_scorer_can_edit": null,
"force_real_time_scoring": false,
"stat_tool_id": 1848623,
"stats_can_be_unlinked": null,
"scoring_methods": "--- \n- live\n- mass\n- tabular\n- quick\n",
"can_edit_final": "league_owner",
"traded_player_stats": null,
"game_sheet_auto_summary_enabled": true,
"visible_stats": "league_xor_division"
},
"subseasons": [
{
"id": 291621,
"name": "Regular Season",
"season_id": 267440,
"position": 1,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-04-20T11:53:00-07:00",
"snl_scoring_enabled": true,
"statistic_grouping_id": 417884,
"workers_completed": null,
"standing_preference": {
"id": 110425,
"standing_tool_id": 1848627,
"standing_type_id": 5,
"standings_aggregation_level": "league",
"qualifiers": null,
"qualifier_limit": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"winning_team_custom_points": null,
"losing_team_custom_points": null,
"tied_team_custom_points": null,
"label_mapping": {},
"extended_fields": [
"win_count",
"loss_count",
"tie_count",
"points"
],
"order_rule": 1,
"overtime_win_custom_points": null,
"overtime_loss_custom_points": null,
"overtime_wins_include_in_wins": true,
"overtime_losses_include_in_losses": true,
"legacy_custom_points": false
},
"live_scoring_stat_configuration": {
"show_plus_minus": null,
"fair_play_points": false
}
}
]
}
],
"subseason_team_instance_mapping": [
{
"subseason_id": 291621,
"team_instance_id": 1930618
}
],
"league_name": "Eastern League",
"site_name": "Sport Ngin API Demo Site",
"sport_name": "Ice Hockey"
},
"thumbnails": {},
"subseason_ids": [
291621
]
}
{"_id":"58866fd62822ed0f00d5b4d3","isReference":true,"version":"56cca51eca43550b002813fa","__v":5,"category":"56e03709f97d422900d63922","createdAt":"2017-01-23T21:04:22.702Z","slug":"team-instances-create-no-league","sync_unique":"","title":"Team Instances Create (no league)","updates":[],"body":"","hidden":false,"next":{"description":"","pages":[]},"order":18,"user":"56548c568975c70d002ea4b4","parentDoc":null,"api":{"settings":"","url":"/team_instances","auth":"required","examples":{"codes":[{"name":"cURL - New Team","language":"curl","code":"curl -X POST -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n \"parent_node_id\": 2458074,\n \"existing_or_new\": \"new\",\n \"top_new_team_template_id\": 23220,\n \"bottom_new_team_template_id\": 23221,\n \"season\":\n \t\t{\n \t\t\"name\": \"2017-18\"\n \t\t},\n \"subseason\":\n \t\t{\n \t\t\"name\": \"Regular Season\"\n \t\t},\n \"league\":\n \t\t{\n \t\t\"sport_id\": 1\n \t\t},\n \"team\":\n {\n \"name\": \"API TEST TEAM\",\n \"button_title\": \"API TEAM\",\n \"abbrev\": \"ATT\",\n \"primary_color\": \"FFFFFF\",\n \"secondary_color\": \"AAAAAA\"\n }\n}\n ' \"https://api.sportngin.com/team_instances\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/team_instances\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n \\\"parent_node_id\\\": 2458074,\\n \\\"existing_or_new\\\": \\\"new\\\",\\n \\\"top_new_team_template_id\\\": 23220,\\n \\\"bottom_new_team_template_id\\\": 23220,\\n \\\"season\\\":\\n \\t{\\n \\t\\\"name\\\": \\\"2017-18\\\"\\n \\t},\\n \\\"subseason\\\":\\n \\t{\\n \\t\\\"name\\\": \\\"Regular Season\\\"\\n \\t},\\n \\\"league\\\":\\n \\t{\\n \\t\\\"sport_id\\\": 1\\n \\t},\\n \\\"team\\\":\\n {\\n \\\"name\\\": \\\"API TEST TEAM\\\",\\n \\\"button_title\\\": \\\"API TEAM\\\",\\n \\\"abbrev\\\": \\\"ATT\\\",\\n \\\"primary_color\\\": \\\"FFFFFF\\\",\\n \\\"secondary_color\\\": \\\"AAAAAA\\\"\\n }\\n}\"\n\nresponse = http.request(request)\nputs response.read_body","name":"Ruby - New Team"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n \\\"parent_node_id\\\": 2458074,\\n \\\"existing_or_new\\\": \\\"new\\\",\\n \\\"top_new_team_template_id\\\": 23220,\\n \\\"bottom_new_team_template_id\\\": 23220,\\n \\\"season\\\":\\n \\t{\\n \\t\\\"name\\\": \\\"2017-18\\\"\\n \\t},\\n \\\"subseason\\\":\\n \\t{\\n \\t\\\"name\\\": \\\"Regular Season\\\"\\n \\t},\\n \\\"league\\\":\\n \\t{\\n \\t\\\"sport_id\\\": 1\\n \\t},\\n \\\"team\\\":\\n {\\n \\\"name\\\": \\\"API TEST TEAM\\\",\\n \\\"button_title\\\": \\\"API TEAM\\\",\\n \\\"abbrev\\\": \\\"ATT\\\",\\n \\\"primary_color\\\": \\\"FFFFFF\\\",\\n \\\"secondary_color\\\": \\\"AAAAAA\\\"\\n }\\n}\");\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/team_instances\")\n .post(body)\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .addHeader(\"content-type\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();","name":"Java - New Team"},{"language":"curl","code":"curl -X POST -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n \"parent_node_id\": 2458074,\n \"top_new_team_template_id\": 23220,\n \"bottom_new_team_template_id\": 23221,\n \"season\":\n \t\t{\n \t\t\"name\": \"2017-18\"\n \t\t},\n \"subseason\":\n \t\t{\n \t\t\"name\": \"Regular Season\"\n \t\t},\n \"league\":\n \t\t{\n \t\t\"sport_id\": 1\n \t\t},\n \t \"node\":\n \t\t{\n \t\t\t\"team_id\": 1373611\n \t\t}\n}\n ' \"https://api.sportngin.com/team_instances\"","name":"cURL - Existing Team"},{"code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/team_instances\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n \\\"parent_node_id\\\": 2458074,\\n \\\"existing_or_new\\\": \\\"new\\\",\\n \\\"top_new_team_template_id\\\": 23220,\\n \\\"bottom_new_team_template_id\\\": 23220,\\n \\\"season\\\":\\n \\t{\\n \\t\\\"name\\\": \\\"2017-18\\\"\\n \\t},\\n \\\"subseason\\\":\\n \\t{\\n \\t\\\"name\\\": \\\"Regular Season\\\"\\n \\t},\\n \\\"league\\\":\\n \\t{\\n \\t\\\"sport_id\\\": 1\\n \\t},\\n \\\"node\\\":\\n {\\n \\\"team_id\\\": 1373611\\n }\\n}\"\n\nresponse = http.request(request)\nputs response.read_body","name":"Ruby - Existing Team","language":"ruby"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n \\\"parent_node_id\\\": 2458074,\\n \\\"existing_or_new\\\": \\\"new\\\",\\n \\\"top_new_team_template_id\\\": 23220,\\n \\\"bottom_new_team_template_id\\\": 23220,\\n \\\"season\\\":\\n \\t{\\n \\t\\\"name\\\": \\\"2017-18\\\"\\n \\t},\\n \\\"subseason\\\":\\n \\t{\\n \\t\\\"name\\\": \\\"Regular Season\\\"\\n \\t},\\n \\\"league\\\":\\n \\t{\\n \\t\\\"sport_id\\\": 1\\n \\t},\\n \\\"node\\\":\\n {\\n \\\"team_id\\\": 1373611\\n }\\n}\");\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/team_instances\")\n .post(body)\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .addHeader(\"content-type\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();","name":"Java - Existing Team"}]},"method":"post","params":[{"default":"","type":"int","name":"parent_node_id","_id":"5886737b9321a50f00f3eada","ref":"","in":"body","required":true,"desc":"ID of the node beneath which the team will be placed"},{"default":"existing","type":"string","name":"existing_or_new","_id":"5886737b9321a50f00f3ead9","ref":"","in":"body","required":true,"desc":"Denotes whether the new Team Instance will be created under a new or existing Team"},{"default":"","type":"int","name":"top_new_team_template_id","_id":"588675689a74d20f00f84b75","ref":"","in":"body","required":false,"desc":"Top template for team page if new team"},{"in":"body","required":false,"desc":"Top template for team page if existing team","default":"","type":"int","name":"top_existing_team_template_id","_id":"588675689a74d20f00f84b74","ref":""},{"required":false,"desc":"Bottom template for team page if new team","default":"","type":"int","name":"bottom_new_team_template_id","_id":"588675689a74d20f00f84b73","ref":"","in":"body"},{"type":"int","name":"bottom_existing_team_template_id","_id":"588675689a74d20f00f84b72","ref":"","in":"body","required":false,"desc":"Bottom template for team page if existing team","default":""},{"desc":"Sport ID for the team being created","default":"","type":"int","name":"league[sport_id]","_id":"5886737b9321a50f00f3ead1","ref":"","in":"body","required":true},{"name":"season[name]","_id":"5886737b9321a50f00f3ead3","ref":"","in":"body","required":true,"desc":"Season name (eg: 2017-2018)","default":"","type":"string"},{"ref":"","in":"body","required":true,"desc":"Subseason name (eg: Regular Season)","default":"","type":"string","name":"subseason[name]","_id":"5886737b9321a50f00f3ead2"},{"in":"body","required":false,"desc":"ID of Team of which to create new instance of","default":"","type":"int","name":"node[team_id]","_id":"588674209321a50f00f3eade","ref":""},{"desc":"Name of team if team does not already exist","default":"","type":"string","name":"team[name]","_id":"5886737b9321a50f00f3ead8","ref":"","in":"body","required":false},{"name":"team[button_title]","_id":"5886737b9321a50f00f3ead7","ref":"","in":"body","required":false,"desc":"Button title of team if team does not already exist","default":"","type":"string"},{"ref":"","in":"body","required":false,"desc":"Abbreviation of team name if team does not already exist","default":"","type":"string","name":"team[abbrev]","_id":"5886737b9321a50f00f3ead6"},{"default":"","type":"string","name":"team[primary_color]","_id":"5886737b9321a50f00f3ead5","ref":"","in":"body","required":false,"desc":"Team primary color if team does not already exist"},{"default":"","type":"string","name":"team[secondary_color]","_id":"5886737b9321a50f00f3ead4","ref":"","in":"body","required":false,"desc":"Team secondary color if team does not already exist"}],"results":{"codes":[{"code":"{\n \"id\": 1930618,\n \"created_at\": \"2016-04-22T09:00:25-07:00\",\n \"updated_at\": \"2016-04-22T09:00:25-07:00\",\n \"team_id\": 1413546,\n \"affects_standings\": true,\n \"name\": \"API TEST TEAM\",\n \"roster_id\": 1892176,\n \"opponent\": null,\n \"parent_team_instance_id\": null,\n \"image_id\": null,\n \"abbrev\": \"ATT\",\n \"primary_color\": \"FFFFFF\",\n \"secondary_color\": \"AAAAAA\",\n \"button_title\": \"API TEAM\",\n \"gender\": \"male\",\n \"management_team_id\": null,\n \"team\": {\n \"id\": 1413546,\n \"name\": \"API TEST TEAM\",\n \"button_title\": \"API TEAM\",\n \"abbrev\": \"ATT\",\n \"image_id\": null,\n \"primary_color\": \"FFFFFF\",\n \"secondary_color\": \"AAAAAA\",\n \"gender\": null,\n \"created_at\": \"2016-04-22T09:00:25-07:00\",\n \"updated_at\": \"2016-04-22T09:00:25-07:00\",\n \"sport_id\": 1,\n \"opponent\": null,\n \"parent_team_id\": null,\n \"ios_whitelabel_url\": null,\n \"android_whitelabel_url\": null,\n \"sites\": [\n {\n \"id\": 11953,\n \"domain_id\": 1149,\n \"domain_name\": \"sportngin.com\",\n \"subdomain\": \"apidemo\",\n \"product_id\": 14,\n \"name\": \"Sport Ngin API Demo Site\",\n \"short_name\": \"Sport Ngin API Demo Site\",\n \"created_on\": \"2016-02-24T06:32:26-08:00\",\n \"updated_on\": \"2016-04-08T10:04:54-07:00\",\n \"created_by_user_id\": 3156422,\n \"updated_by_user_id\": null,\n \"timezone\": \"US/Central\",\n \"twitter_user_id\": null,\n \"layout_theme_id\": 51,\n \"secure_subdomain\": \"apidemo\",\n \"address_id\": 4447713,\n \"membership_privacy\": \"open\",\n \"membership_grace_period\": 1,\n \"boss_billing_account_id\": null,\n \"boss_organization_id\": 27743\n }\n ],\n \"leagues\": [],\n \"thumbnails\": {},\n \"thumbnails_ssl\": {},\n \"current_subseason_ids\": [\n 291621\n ],\n \"seasons\": [\n {\n \"id\": 267440,\n \"name\": \"2016\",\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n \"solo_team_league_id\": 199530,\n \"has_metadata\": null,\n \"show_shared_schedule\": false,\n \"stat_preference\": {\n \"id\": 292407,\n \"updated_on\": \"2016-03-22T12:46:58-07:00\",\n \"created_on\": \"2016-03-22T12:46:58-07:00\",\n \"game_defaults\": {\n \"auto_navigate_to_play_details\": true,\n \"field_of_play_enabled\": false,\n \"game_misconduct_time\": 0,\n \"ice_hockey_goalie_order_by\": null,\n \"ice_hockey_goalie_order_by_secondary\": null,\n \"ice_hockey_goalie_order_dir\": null,\n \"ice_hockey_goalie_order_dir_secondary\": null,\n \"ice_hockey_goalie_stat_qualify_by\": null,\n \"ice_hockey_goalie_stat_qualify_val\": null,\n \"ice_hockey_skater_order_by\": null,\n \"ice_hockey_skater_order_by_secondary\": null,\n \"ice_hockey_skater_order_dir\": null,\n \"ice_hockey_skater_order_dir_secondary\": null,\n \"ice_hockey_skater_stat_qualify_by\": null,\n \"ice_hockey_skater_stat_qualify_val\": null,\n \"ice_hockey_team_scoring_order_by\": \"pts\",\n \"ice_hockey_team_scoring_order_by_secondary\": null,\n \"ice_hockey_team_scoring_order_dir\": \"desc\",\n \"ice_hockey_team_scoring_order_dir_secondary\": null,\n \"ice_hockey_team_scoring_stat_qualify_by\": null,\n \"ice_hockey_team_scoring_stat_qualify_val\": null,\n \"ice_hockey_team_stats_order_by\": null,\n \"ice_hockey_team_stats_order_by_secondary\": null,\n \"ice_hockey_team_stats_order_dir\": null,\n \"ice_hockey_team_stats_order_dir_secondary\": null,\n \"ice_hockey_team_stats_stat_qualify_by\": null,\n \"ice_hockey_team_stats_stat_qualify_val\": null,\n \"intermission_length\": 1,\n \"major_adjustment_time\": 0,\n \"major_penalty_time\": 5,\n \"match_penalty_time\": 5,\n \"max_goal_differential\": 0,\n \"max_player_major_penalties\": 2,\n \"max_player_penalties\": 5,\n \"max_team_penalties\": 15,\n \"minor_adjustment_time\": 0,\n \"minor_penalty_time\": 2,\n \"misconduct_time\": 10,\n \"overtime_intervals\": 2,\n \"overtime_length\": \"5\",\n \"post_live_updates\": true,\n \"regulation_time_intervals\": null,\n \"shootout_enabled\": false,\n \"stop_run_time\": true,\n \"time_interval_name\": \"period\",\n \"time_intervals\": [\n \"20\",\n \"20\",\n \"20\"\n ],\n \"timeout_time\": 1,\n \"timeouts\": 1,\n \"track_goal_types\": true,\n \"track_player_sog\": true,\n \"warmup_length\": 5\n },\n \"season_id\": 267440,\n \"original_scorer_can_edit\": null,\n \"force_real_time_scoring\": false,\n \"stat_tool_id\": 1848623,\n \"stats_can_be_unlinked\": null,\n \"scoring_methods\": \"--- \\n- live\\n- mass\\n- tabular\\n- quick\\n\",\n \"can_edit_final\": \"league_owner\",\n \"traded_player_stats\": null,\n \"game_sheet_auto_summary_enabled\": true,\n \"visible_stats\": \"league_xor_division\"\n },\n \"subseasons\": [\n {\n \"id\": 291621,\n \"name\": \"Regular Season\",\n \"season_id\": 267440,\n \"position\": 1,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-04-20T11:53:00-07:00\",\n \"snl_scoring_enabled\": true,\n \"statistic_grouping_id\": 417884,\n \"workers_completed\": null,\n \"standing_preference\": null,\n \"live_scoring_stat_configuration\": {\n \"show_plus_minus\": null,\n \"fair_play_points\": false\n }\n }\n ]\n }\n ],\n \"subseason_team_instance_mapping\": [\n {\n \"subseason_id\": 291621,\n \"team_instance_id\": 1930618\n }\n ],\n \"league_name\": null,\n \"site_name\": \"Sport Ngin API Demo Site\",\n \"sport_name\": \"Ice Hockey\"\n },\n \"thumbnails\": {},\n \"subseason_ids\": [\n 291621\n ]\n}","name":"","status":200,"language":"json"}]}},"githubsync":"","link_external":false,"link_url":"","excerpt":"The Create method accepts a single Team Instance (see attributes above) and creates a new record in SportsEngine. A Single Team (aka Solo Team) is not tied to a particular parent organization. To create a Team Instance independent of a league, the endpoint does not require a `subseason_id` or a `league_instance_id`.\n\n###Parameters","project":"5641217e0ee5370d00da636d","type":"post","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postTeam Instances Create (no league)
Body Params
Definition
Examples
curl -X POST -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -H "Content-Type: application/json" -d '{
"parent_node_id": 2458074,
"existing_or_new": "new",
"top_new_team_template_id": 23220,
"bottom_new_team_template_id": 23221,
"season":
{
"name": "2017-18"
},
"subseason":
{
"name": "Regular Season"
},
"league":
{
"sport_id": 1
},
"team":
{
"name": "API TEST TEAM",
"button_title": "API TEAM",
"abbrev": "ATT",
"primary_color": "FFFFFF",
"secondary_color": "AAAAAA"
}
}
' "https://api.sportngin.com/team_instances"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/team_instances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
request["content-type"] = 'application/json'
request.body = "{\n \"parent_node_id\": 2458074,\n \"existing_or_new\": \"new\",\n \"top_new_team_template_id\": 23220,\n \"bottom_new_team_template_id\": 23220,\n \"season\":\n \t{\n \t\"name\": \"2017-18\"\n \t},\n \"subseason\":\n \t{\n \t\"name\": \"Regular Season\"\n \t},\n \"league\":\n \t{\n \t\"sport_id\": 1\n \t},\n \"team\":\n {\n \"name\": \"API TEST TEAM\",\n \"button_title\": \"API TEAM\",\n \"abbrev\": \"ATT\",\n \"primary_color\": \"FFFFFF\",\n \"secondary_color\": \"AAAAAA\"\n }\n}"
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"parent_node_id\": 2458074,\n \"existing_or_new\": \"new\",\n \"top_new_team_template_id\": 23220,\n \"bottom_new_team_template_id\": 23220,\n \"season\":\n \t{\n \t\"name\": \"2017-18\"\n \t},\n \"subseason\":\n \t{\n \t\"name\": \"Regular Season\"\n \t},\n \"league\":\n \t{\n \t\"sport_id\": 1\n \t},\n \"team\":\n {\n \"name\": \"API TEST TEAM\",\n \"button_title\": \"API TEAM\",\n \"abbrev\": \"ATT\",\n \"primary_color\": \"FFFFFF\",\n \"secondary_color\": \"AAAAAA\"\n }\n}");
Request request = new Request.Builder()
.url("https://api.sportngin.com/team_instances")
.post(body)
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
curl -X POST -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -H "Content-Type: application/json" -d '{
"parent_node_id": 2458074,
"top_new_team_template_id": 23220,
"bottom_new_team_template_id": 23221,
"season":
{
"name": "2017-18"
},
"subseason":
{
"name": "Regular Season"
},
"league":
{
"sport_id": 1
},
"node":
{
"team_id": 1373611
}
}
' "https://api.sportngin.com/team_instances"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/team_instances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
request["content-type"] = 'application/json'
request.body = "{\n \"parent_node_id\": 2458074,\n \"existing_or_new\": \"new\",\n \"top_new_team_template_id\": 23220,\n \"bottom_new_team_template_id\": 23220,\n \"season\":\n \t{\n \t\"name\": \"2017-18\"\n \t},\n \"subseason\":\n \t{\n \t\"name\": \"Regular Season\"\n \t},\n \"league\":\n \t{\n \t\"sport_id\": 1\n \t},\n \"node\":\n {\n \"team_id\": 1373611\n }\n}"
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"parent_node_id\": 2458074,\n \"existing_or_new\": \"new\",\n \"top_new_team_template_id\": 23220,\n \"bottom_new_team_template_id\": 23220,\n \"season\":\n \t{\n \t\"name\": \"2017-18\"\n \t},\n \"subseason\":\n \t{\n \t\"name\": \"Regular Season\"\n \t},\n \"league\":\n \t{\n \t\"sport_id\": 1\n \t},\n \"node\":\n {\n \"team_id\": 1373611\n }\n}");
Request request = new Request.Builder()
.url("https://api.sportngin.com/team_instances")
.post(body)
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
Result Format
{
"id": 1930618,
"created_at": "2016-04-22T09:00:25-07:00",
"updated_at": "2016-04-22T09:00:25-07:00",
"team_id": 1413546,
"affects_standings": true,
"name": "API TEST TEAM",
"roster_id": 1892176,
"opponent": null,
"parent_team_instance_id": null,
"image_id": null,
"abbrev": "ATT",
"primary_color": "FFFFFF",
"secondary_color": "AAAAAA",
"button_title": "API TEAM",
"gender": "male",
"management_team_id": null,
"team": {
"id": 1413546,
"name": "API TEST TEAM",
"button_title": "API TEAM",
"abbrev": "ATT",
"image_id": null,
"primary_color": "FFFFFF",
"secondary_color": "AAAAAA",
"gender": null,
"created_at": "2016-04-22T09:00:25-07:00",
"updated_at": "2016-04-22T09:00:25-07:00",
"sport_id": 1,
"opponent": null,
"parent_team_id": null,
"ios_whitelabel_url": null,
"android_whitelabel_url": null,
"sites": [
{
"id": 11953,
"domain_id": 1149,
"domain_name": "sportngin.com",
"subdomain": "apidemo",
"product_id": 14,
"name": "Sport Ngin API Demo Site",
"short_name": "Sport Ngin API Demo Site",
"created_on": "2016-02-24T06:32:26-08:00",
"updated_on": "2016-04-08T10:04:54-07:00",
"created_by_user_id": 3156422,
"updated_by_user_id": null,
"timezone": "US/Central",
"twitter_user_id": null,
"layout_theme_id": 51,
"secure_subdomain": "apidemo",
"address_id": 4447713,
"membership_privacy": "open",
"membership_grace_period": 1,
"boss_billing_account_id": null,
"boss_organization_id": 27743
}
],
"leagues": [],
"thumbnails": {},
"thumbnails_ssl": {},
"current_subseason_ids": [
291621
],
"seasons": [
{
"id": 267440,
"name": "2016",
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"solo_team_league_id": 199530,
"has_metadata": null,
"show_shared_schedule": false,
"stat_preference": {
"id": 292407,
"updated_on": "2016-03-22T12:46:58-07:00",
"created_on": "2016-03-22T12:46:58-07:00",
"game_defaults": {
"auto_navigate_to_play_details": true,
"field_of_play_enabled": false,
"game_misconduct_time": 0,
"ice_hockey_goalie_order_by": null,
"ice_hockey_goalie_order_by_secondary": null,
"ice_hockey_goalie_order_dir": null,
"ice_hockey_goalie_order_dir_secondary": null,
"ice_hockey_goalie_stat_qualify_by": null,
"ice_hockey_goalie_stat_qualify_val": null,
"ice_hockey_skater_order_by": null,
"ice_hockey_skater_order_by_secondary": null,
"ice_hockey_skater_order_dir": null,
"ice_hockey_skater_order_dir_secondary": null,
"ice_hockey_skater_stat_qualify_by": null,
"ice_hockey_skater_stat_qualify_val": null,
"ice_hockey_team_scoring_order_by": "pts",
"ice_hockey_team_scoring_order_by_secondary": null,
"ice_hockey_team_scoring_order_dir": "desc",
"ice_hockey_team_scoring_order_dir_secondary": null,
"ice_hockey_team_scoring_stat_qualify_by": null,
"ice_hockey_team_scoring_stat_qualify_val": null,
"ice_hockey_team_stats_order_by": null,
"ice_hockey_team_stats_order_by_secondary": null,
"ice_hockey_team_stats_order_dir": null,
"ice_hockey_team_stats_order_dir_secondary": null,
"ice_hockey_team_stats_stat_qualify_by": null,
"ice_hockey_team_stats_stat_qualify_val": null,
"intermission_length": 1,
"major_adjustment_time": 0,
"major_penalty_time": 5,
"match_penalty_time": 5,
"max_goal_differential": 0,
"max_player_major_penalties": 2,
"max_player_penalties": 5,
"max_team_penalties": 15,
"minor_adjustment_time": 0,
"minor_penalty_time": 2,
"misconduct_time": 10,
"overtime_intervals": 2,
"overtime_length": "5",
"post_live_updates": true,
"regulation_time_intervals": null,
"shootout_enabled": false,
"stop_run_time": true,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
],
"timeout_time": 1,
"timeouts": 1,
"track_goal_types": true,
"track_player_sog": true,
"warmup_length": 5
},
"season_id": 267440,
"original_scorer_can_edit": null,
"force_real_time_scoring": false,
"stat_tool_id": 1848623,
"stats_can_be_unlinked": null,
"scoring_methods": "--- \n- live\n- mass\n- tabular\n- quick\n",
"can_edit_final": "league_owner",
"traded_player_stats": null,
"game_sheet_auto_summary_enabled": true,
"visible_stats": "league_xor_division"
},
"subseasons": [
{
"id": 291621,
"name": "Regular Season",
"season_id": 267440,
"position": 1,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-04-20T11:53:00-07:00",
"snl_scoring_enabled": true,
"statistic_grouping_id": 417884,
"workers_completed": null,
"standing_preference": null,
"live_scoring_stat_configuration": {
"show_plus_minus": null,
"fair_play_points": false
}
}
]
}
],
"subseason_team_instance_mapping": [
{
"subseason_id": 291621,
"team_instance_id": 1930618
}
],
"league_name": null,
"site_name": "Sport Ngin API Demo Site",
"sport_name": "Ice Hockey"
},
"thumbnails": {},
"subseason_ids": [
291621
]
}
{"_id":"57eeae42cc36920e00bff4ba","__v":0,"category":"56e03709f97d422900d63922","parentDoc":null,"project":"5641217e0ee5370d00da636d","sync_unique":"","updates":[],"user":"56548c568975c70d002ea4b4","api":{"results":{"codes":[{"code":"{\n \"id\": 1876244,\n \"created_at\": \"2016-03-22T13:19:31-07:00\",\n \"updated_at\": \"2016-09-30T11:21:58-07:00\",\n \"team_id\": 1373612,\n \"affects_standings\": true,\n \"name\": \"Buffalo Bison\",\n \"roster_id\": 1837159,\n \"opponent\": null,\n \"parent_team_instance_id\": null,\n \"image_id\": null,\n \"abbrev\": \"Buff\",\n \"primary_color\": \"000000\",\n \"secondary_color\": \"000000\",\n \"button_title\": \"Buff\",\n \"gender\": \"male\",\n \"management_team_id\": null,\n \"team\": {\n \"id\": 1373612,\n \"name\": \"Buffalo Bison\",\n \"button_title\": \"Buffalo\",\n \"abbrev\": \"Buff\",\n \"image_id\": null,\n \"primary_color\": \"000000\",\n \"secondary_color\": \"000000\",\n \"gender\": \"male\",\n \"created_at\": \"2016-03-22T13:06:41-07:00\",\n \"updated_at\": \"2016-03-23T09:34:28-07:00\",\n \"sport_id\": 1,\n \"opponent\": null,\n \"parent_team_id\": null,\n \"ios_whitelabel_url\": null,\n \"android_whitelabel_url\": null,\n \"sites\": [\n {\n \"id\": 11953,\n \"domain_id\": 1149,\n \"domain_name\": \"sportngin.com\",\n \"subdomain\": \"apidemo\",\n \"product_id\": 14,\n \"name\": \"Sport Ngin API Demo Site\",\n \"short_name\": \"Sport Ngin API Demo Site\",\n \"created_on\": \"2016-02-24T06:32:26-08:00\",\n \"updated_on\": \"2016-09-29T07:59:17-07:00\",\n \"created_by_user_id\": 3156422,\n \"updated_by_user_id\": 3646297,\n \"timezone\": \"America/Chicago\",\n \"twitter_user_id\": null,\n \"layout_theme_id\": 53,\n \"secure_subdomain\": \"apidemo\",\n \"address_id\": 4447713,\n \"membership_privacy\": \"open\",\n \"membership_grace_period\": 1,\n \"boss_billing_account_id\": null,\n \"boss_organization_id\": 27743\n }\n ],\n \"leagues\": [\n {\n \"id\": 27737,\n \"name\": \"Eastern League\",\n \"current_subseason_id\": 291621,\n \"site_id\": 11953,\n \"sport_id\": 1,\n \"image_id\": null,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-05-02T13:29:58-07:00\",\n \"button_title\": \"Eastern\",\n \"primary_color\": \"00AEEF\",\n \"secondary_color\": \"666666\",\n \"gender\": \"male\",\n \"abbrev\": \"East\",\n \"score_ribbon\": false,\n \"tweet_games\": null,\n \"game_sheet_label\": \"gamesheet\"\n }\n ],\n \"thumbnails\": {},\n \"thumbnails_ssl\": {},\n \"current_subseason_ids\": [\n 291621\n ],\n \"seasons\": [\n ...","language":"json","status":200,"name":""}]},"settings":"","url":"/team_instances/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X PUT -H \"Authorization: Bearer ACCESS_TOKEN \" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n\t\"button_title\": \"Buff\"\n}\n}' \"https://api.sportngin.com/team_instances/1876244\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/team_instances/1876244\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n \\\"button_title\\\": \\\"Buff\\\" \\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n \\\"button_title\\\": \\\"Buff\\\" \\n}\");\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/team_instances/1876244\")\n .put(body)\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .addHeader(\"content-type\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"put","params":[{"_id":"577e8f45a74eb40e00d97b62","ref":"","in":"path","required":true,"desc":"Id of TeamInstance to update","default":"","type":"int","name":"id"}]},"createdAt":"2016-09-30T18:26:10.830Z","excerpt":"The Update method updates the provided fields for a given `id`.\n\n###Parameters","githubsync":"","hidden":false,"isReference":true,"link_external":false,"order":19,"type":"put","title":"Team Instances Update","version":"56cca51eca43550b002813fa","body":"","link_url":"","slug":"team-instances-update","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putTeam Instances Update
Path Params
Definition
Examples
curl -X PUT -H "Authorization: Bearer ACCESS_TOKEN " -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -H "Content-Type: application/json" -d '{
"button_title": "Buff"
}
}' "https://api.sportngin.com/team_instances/1876244"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/team_instances/1876244")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Put.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
request["content-type"] = 'application/json'
request.body = "{\n \"button_title\": \"Buff\" \n}"
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"button_title\": \"Buff\" \n}");
Request request = new Request.Builder()
.url("https://api.sportngin.com/team_instances/1876244")
.put(body)
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
Result Format
{
"id": 1876244,
"created_at": "2016-03-22T13:19:31-07:00",
"updated_at": "2016-09-30T11:21:58-07:00",
"team_id": 1373612,
"affects_standings": true,
"name": "Buffalo Bison",
"roster_id": 1837159,
"opponent": null,
"parent_team_instance_id": null,
"image_id": null,
"abbrev": "Buff",
"primary_color": "000000",
"secondary_color": "000000",
"button_title": "Buff",
"gender": "male",
"management_team_id": null,
"team": {
"id": 1373612,
"name": "Buffalo Bison",
"button_title": "Buffalo",
"abbrev": "Buff",
"image_id": null,
"primary_color": "000000",
"secondary_color": "000000",
"gender": "male",
"created_at": "2016-03-22T13:06:41-07:00",
"updated_at": "2016-03-23T09:34:28-07:00",
"sport_id": 1,
"opponent": null,
"parent_team_id": null,
"ios_whitelabel_url": null,
"android_whitelabel_url": null,
"sites": [
{
"id": 11953,
"domain_id": 1149,
"domain_name": "sportngin.com",
"subdomain": "apidemo",
"product_id": 14,
"name": "Sport Ngin API Demo Site",
"short_name": "Sport Ngin API Demo Site",
"created_on": "2016-02-24T06:32:26-08:00",
"updated_on": "2016-09-29T07:59:17-07:00",
"created_by_user_id": 3156422,
"updated_by_user_id": 3646297,
"timezone": "America/Chicago",
"twitter_user_id": null,
"layout_theme_id": 53,
"secure_subdomain": "apidemo",
"address_id": 4447713,
"membership_privacy": "open",
"membership_grace_period": 1,
"boss_billing_account_id": null,
"boss_organization_id": 27743
}
],
"leagues": [
{
"id": 27737,
"name": "Eastern League",
"current_subseason_id": 291621,
"site_id": 11953,
"sport_id": 1,
"image_id": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-05-02T13:29:58-07:00",
"button_title": "Eastern",
"primary_color": "00AEEF",
"secondary_color": "666666",
"gender": "male",
"abbrev": "East",
"score_ribbon": false,
"tweet_games": null,
"game_sheet_label": "gamesheet"
}
],
"thumbnails": {},
"thumbnails_ssl": {},
"current_subseason_ids": [
291621
],
"seasons": [
{"_id":"57eea7c1cc36920e00bff4b7","body":"","hidden":false,"slug":"team-instances-delete","excerpt":"The Delete method permanently deletes the associated TeamInstance record in SportsEngine. *This method takes action upon initial invocation and cannot be reversed.*\n\n###Parameters","project":"5641217e0ee5370d00da636d","sync_unique":"","parentDoc":null,"title":"Team Instances Delete","__v":0,"api":{"method":"delete","params":[{"desc":"Id belonging to the team_instance of interest","default":"","type":"int","name":"id","_id":"57114eae5ba0d80e00f51614","ref":"","in":"path","required":true}],"results":{"codes":[{"language":"json","code":"{\n \"id\": 1876243,\n \"created_at\": \"2016-03-22T13:19:12-07:00\",\n \"updated_at\": \"2016-03-23T09:34:28-07:00\",\n \"team_id\": 1373611,\n \"affects_standings\": true,\n \"name\": \"Boston Bears\",\n \"roster_id\": 1837158,\n \"opponent\": null,\n \"parent_team_instance_id\": null,\n \"image_id\": null,\n \"abbrev\": \"Bos\",\n \"primary_color\": \"000000\",\n \"secondary_color\": \"000000\",\n \"button_title\": \"Boston\",\n \"gender\": \"male\",\n \"management_team_id\": null,\n \"team\": {\n \"id\": 1373611,\n \"name\": \"Boston Bears\",\n \"button_title\": \"Boston\",\n \"abbrev\": \"Bos\",\n \"image_id\": null,\n \"primary_color\": \"000000\",\n \"secondary_color\": \"000000\",\n \"gender\": \"male\",\n \"created_at\": \"2016-03-22T13:06:41-07:00\",\n \"updated_at\": \"2016-03-23T09:34:28-07:00\",\n \"sport_id\": 1,\n \"opponent\": null,\n \"parent_team_id\": null,\n \"ios_whitelabel_url\": null,\n \"android_whitelabel_url\": null,\n \"sites\": [\n {\n \"id\": 11953,\n \"domain_id\": 1149,\n \"domain_name\": \"sportngin.com\",\n \"subdomain\": \"apidemo\",\n \"product_id\": 14,\n \"name\": \"Sport Ngin API Demo Site\",\n \"short_name\": \"Sport Ngin API Demo Site\",\n \"created_on\": \"2016-02-24T06:32:26-08:00\",\n \"updated_on\": \"2016-04-08T10:04:54-07:00\",\n \"created_by_user_id\": 3156422,\n \"updated_by_user_id\": null,\n \"timezone\": \"US/Central\",\n \"twitter_user_id\": null,\n \"layout_theme_id\": 51,\n \"secure_subdomain\": \"apidemo\",\n \"address_id\": 4447713,\n \"membership_privacy\": \"open\",\n \"membership_grace_period\": 1,\n \"boss_billing_account_id\": null,\n \"boss_organization_id\": 27743\n }\n ],\n \"leagues\": [\n {\n \"id\": 27737,\n \"name\": \"Eastern League\",\n \"current_subseason_id\": 291621,\n \"site_id\": 11953,\n \"sport_id\": 1,\n \"image_id\": null,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-24T07:20:49-07:00\",\n \"button_title\": \"Eastern\",\n \"primary_color\": \"00AEEF\",\n \"secondary_color\": \"666666\",\n \"gender\": \"male\",\n \"abbrev\": \"East\",\n \"score_ribbon\": false,\n \"tweet_games\": null,\n \"game_sheet_label\": \"gamesheet\"\n }\n ],\n \"thumbnails\": {},\n \"thumbnails_ssl\": {},\n \"current_subseason_ids\": [\n 291621\n ],\n \"seasons\": [\n {\n \"id\": 267440,\n \"name\": \"2016\",\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n \"solo_team_league_id\": null,\n \"has_metadata\": null,\n \"show_shared_schedule\": false,\n \"stat_preference\": {\n \"id\": 292407,\n \"updated_on\": \"2016-03-22T12:46:58-07:00\",\n \"created_on\": \"2016-03-22T12:46:58-07:00\",\n \"game_defaults\": {\n \"auto_navigate_to_play_details\": true,\n \"field_of_play_enabled\": false,\n \"game_misconduct_time\": 0,\n \"ice_hockey_goalie_order_by\": null,\n \"ice_hockey_goalie_order_by_secondary\": null,\n \"ice_hockey_goalie_order_dir\": null,\n \"ice_hockey_goalie_order_dir_secondary\": null,\n \"ice_hockey_goalie_stat_qualify_by\": null,\n \"ice_hockey_goalie_stat_qualify_val\": null,\n \"ice_hockey_skater_order_by\": null,\n \"ice_hockey_skater_order_by_secondary\": null,\n \"ice_hockey_skater_order_dir\": null,\n \"ice_hockey_skater_order_dir_secondary\": null,\n \"ice_hockey_skater_stat_qualify_by\": null,\n \"ice_hockey_skater_stat_qualify_val\": null,\n \"ice_hockey_team_scoring_order_by\": \"pts\",\n \"ice_hockey_team_scoring_order_by_secondary\": null,\n \"ice_hockey_team_scoring_order_dir\": \"desc\",\n \"ice_hockey_team_scoring_order_dir_secondary\": null,\n \"ice_hockey_team_scoring_stat_qualify_by\": null,\n \"ice_hockey_team_scoring_stat_qualify_val\": null,\n \"ice_hockey_team_stats_order_by\": null,\n \"ice_hockey_team_stats_order_by_secondary\": null,\n \"ice_hockey_team_stats_order_dir\": null,\n \"ice_hockey_team_stats_order_dir_secondary\": null,\n \"ice_hockey_team_stats_stat_qualify_by\": null,\n \"ice_hockey_team_stats_stat_qualify_val\": null,\n \"intermission_length\": 1,\n \"major_adjustment_time\": 0,\n \"major_penalty_time\": 5,\n \"match_penalty_time\": 5,\n \"max_goal_differential\": 0,\n \"max_player_major_penalties\": 2,\n \"max_player_penalties\": 5,\n \"max_team_penalties\": 15,\n \"minor_adjustment_time\": 0,\n \"minor_penalty_time\": 2,\n \"misconduct_time\": 10,\n \"overtime_intervals\": 2,\n \"overtime_length\": \"5\",\n \"post_live_updates\": true,\n \"regulation_time_intervals\": null,\n \"shootout_enabled\": false,\n \"stop_run_time\": true,\n \"time_interval_name\": \"period\",\n \"time_intervals\": [\n \"20\",\n \"20\",\n \"20\"\n ],\n \"timeout_time\": 1,\n \"timeouts\": 1,\n \"track_goal_types\": true,\n \"track_player_sog\": true,\n \"warmup_length\": 5\n },\n \"season_id\": 267440,\n \"original_scorer_can_edit\": null,\n \"force_real_time_scoring\": false,\n \"stat_tool_id\": 1848623,\n \"stats_can_be_unlinked\": null,\n \"scoring_methods\": \"--- \\n- live\\n- mass\\n- tabular\\n- quick\\n\",\n \"can_edit_final\": \"league_owner\",\n \"traded_player_stats\": null,\n \"game_sheet_auto_summary_enabled\": true,\n \"visible_stats\": \"league_xor_division\"\n },\n \"subseasons\": [\n {\n \"id\": 291621,\n \"name\": \"Regular Season\",\n \"season_id\": 267440,\n \"position\": 1,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-04-15T11:02:33-07:00\",\n \"snl_scoring_enabled\": true,\n \"statistic_grouping_id\": 417884,\n \"workers_completed\": null,\n \"standing_preference\": {\n \"id\": 110425,\n \"standing_tool_id\": 1848627,\n \"standing_type_id\": 5,\n \"standings_aggregation_level\": \"league\",\n \"qualifiers\": null,\n \"qualifier_limit\": null,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n \"winning_team_custom_points\": null,\n \"losing_team_custom_points\": null,\n \"tied_team_custom_points\": null,\n \"label_mapping\": {},\n \"extended_fields\": [\n \"win_count\",\n \"loss_count\",\n \"tie_count\",\n \"points\"\n ],\n \"order_rule\": 1,\n \"overtime_win_custom_points\": null,\n \"overtime_loss_custom_points\": null,\n \"overtime_wins_include_in_wins\": true,\n \"overtime_losses_include_in_losses\": true,\n \"legacy_custom_points\": false\n },\n \"live_scoring_stat_configuration\": {\n \"show_plus_minus\": null,\n \"fair_play_points\": false\n }\n }\n ]\n }\n ],\n \"subseason_team_instance_mapping\": [\n {\n \"subseason_id\": 291621,\n \"team_instance_id\": 1876243\n }\n ],\n \"league_name\": \"Eastern League\",\n \"site_name\": \"Sport Ngin API Demo Site\",\n \"sport_name\": \"Ice Hockey\"\n },\n \"thumbnails\": {},\n \"subseason_ids\": [\n 291621\n ]\n}","name":"","status":200}]},"settings":"","url":"/team_instances/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X DELETE -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/team_instances/1876243\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/team_instances/1876243\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/team_instances/1876243\")\n .delete(null)\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]}},"category":"56e03709f97d422900d63922","githubsync":"","isReference":true,"order":20,"type":"delete","version":"56cca51eca43550b002813fa","createdAt":"2016-09-30T17:58:25.835Z","link_external":false,"link_url":"","updates":[],"user":"56548c568975c70d002ea4b4","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteTeam Instances Delete
Path Params
Definition
Examples
curl -X DELETE -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/team_instances/1876243"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/team_instances/1876243")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Delete.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.sportngin.com/team_instances/1876243")
.delete(null)
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.build();
Response response = client.newCall(request).execute();
Result Format
{
"id": 1876243,
"created_at": "2016-03-22T13:19:12-07:00",
"updated_at": "2016-03-23T09:34:28-07:00",
"team_id": 1373611,
"affects_standings": true,
"name": "Boston Bears",
"roster_id": 1837158,
"opponent": null,
"parent_team_instance_id": null,
"image_id": null,
"abbrev": "Bos",
"primary_color": "000000",
"secondary_color": "000000",
"button_title": "Boston",
"gender": "male",
"management_team_id": null,
"team": {
"id": 1373611,
"name": "Boston Bears",
"button_title": "Boston",
"abbrev": "Bos",
"image_id": null,
"primary_color": "000000",
"secondary_color": "000000",
"gender": "male",
"created_at": "2016-03-22T13:06:41-07:00",
"updated_at": "2016-03-23T09:34:28-07:00",
"sport_id": 1,
"opponent": null,
"parent_team_id": null,
"ios_whitelabel_url": null,
"android_whitelabel_url": null,
"sites": [
{
"id": 11953,
"domain_id": 1149,
"domain_name": "sportngin.com",
"subdomain": "apidemo",
"product_id": 14,
"name": "Sport Ngin API Demo Site",
"short_name": "Sport Ngin API Demo Site",
"created_on": "2016-02-24T06:32:26-08:00",
"updated_on": "2016-04-08T10:04:54-07:00",
"created_by_user_id": 3156422,
"updated_by_user_id": null,
"timezone": "US/Central",
"twitter_user_id": null,
"layout_theme_id": 51,
"secure_subdomain": "apidemo",
"address_id": 4447713,
"membership_privacy": "open",
"membership_grace_period": 1,
"boss_billing_account_id": null,
"boss_organization_id": 27743
}
],
"leagues": [
{
"id": 27737,
"name": "Eastern League",
"current_subseason_id": 291621,
"site_id": 11953,
"sport_id": 1,
"image_id": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-24T07:20:49-07:00",
"button_title": "Eastern",
"primary_color": "00AEEF",
"secondary_color": "666666",
"gender": "male",
"abbrev": "East",
"score_ribbon": false,
"tweet_games": null,
"game_sheet_label": "gamesheet"
}
],
"thumbnails": {},
"thumbnails_ssl": {},
"current_subseason_ids": [
291621
],
"seasons": [
{
"id": 267440,
"name": "2016",
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"solo_team_league_id": null,
"has_metadata": null,
"show_shared_schedule": false,
"stat_preference": {
"id": 292407,
"updated_on": "2016-03-22T12:46:58-07:00",
"created_on": "2016-03-22T12:46:58-07:00",
"game_defaults": {
"auto_navigate_to_play_details": true,
"field_of_play_enabled": false,
"game_misconduct_time": 0,
"ice_hockey_goalie_order_by": null,
"ice_hockey_goalie_order_by_secondary": null,
"ice_hockey_goalie_order_dir": null,
"ice_hockey_goalie_order_dir_secondary": null,
"ice_hockey_goalie_stat_qualify_by": null,
"ice_hockey_goalie_stat_qualify_val": null,
"ice_hockey_skater_order_by": null,
"ice_hockey_skater_order_by_secondary": null,
"ice_hockey_skater_order_dir": null,
"ice_hockey_skater_order_dir_secondary": null,
"ice_hockey_skater_stat_qualify_by": null,
"ice_hockey_skater_stat_qualify_val": null,
"ice_hockey_team_scoring_order_by": "pts",
"ice_hockey_team_scoring_order_by_secondary": null,
"ice_hockey_team_scoring_order_dir": "desc",
"ice_hockey_team_scoring_order_dir_secondary": null,
"ice_hockey_team_scoring_stat_qualify_by": null,
"ice_hockey_team_scoring_stat_qualify_val": null,
"ice_hockey_team_stats_order_by": null,
"ice_hockey_team_stats_order_by_secondary": null,
"ice_hockey_team_stats_order_dir": null,
"ice_hockey_team_stats_order_dir_secondary": null,
"ice_hockey_team_stats_stat_qualify_by": null,
"ice_hockey_team_stats_stat_qualify_val": null,
"intermission_length": 1,
"major_adjustment_time": 0,
"major_penalty_time": 5,
"match_penalty_time": 5,
"max_goal_differential": 0,
"max_player_major_penalties": 2,
"max_player_penalties": 5,
"max_team_penalties": 15,
"minor_adjustment_time": 0,
"minor_penalty_time": 2,
"misconduct_time": 10,
"overtime_intervals": 2,
"overtime_length": "5",
"post_live_updates": true,
"regulation_time_intervals": null,
"shootout_enabled": false,
"stop_run_time": true,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
],
"timeout_time": 1,
"timeouts": 1,
"track_goal_types": true,
"track_player_sog": true,
"warmup_length": 5
},
"season_id": 267440,
"original_scorer_can_edit": null,
"force_real_time_scoring": false,
"stat_tool_id": 1848623,
"stats_can_be_unlinked": null,
"scoring_methods": "--- \n- live\n- mass\n- tabular\n- quick\n",
"can_edit_final": "league_owner",
"traded_player_stats": null,
"game_sheet_auto_summary_enabled": true,
"visible_stats": "league_xor_division"
},
"subseasons": [
{
"id": 291621,
"name": "Regular Season",
"season_id": 267440,
"position": 1,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-04-15T11:02:33-07:00",
"snl_scoring_enabled": true,
"statistic_grouping_id": 417884,
"workers_completed": null,
"standing_preference": {
"id": 110425,
"standing_tool_id": 1848627,
"standing_type_id": 5,
"standings_aggregation_level": "league",
"qualifiers": null,
"qualifier_limit": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"winning_team_custom_points": null,
"losing_team_custom_points": null,
"tied_team_custom_points": null,
"label_mapping": {},
"extended_fields": [
"win_count",
"loss_count",
"tie_count",
"points"
],
"order_rule": 1,
"overtime_win_custom_points": null,
"overtime_loss_custom_points": null,
"overtime_wins_include_in_wins": true,
"overtime_losses_include_in_losses": true,
"legacy_custom_points": false
},
"live_scoring_stat_configuration": {
"show_plus_minus": null,
"fair_play_points": false
}
}
]
}
],
"subseason_team_instance_mapping": [
{
"subseason_id": 291621,
"team_instance_id": 1876243
}
],
"league_name": "Eastern League",
"site_name": "Sport Ngin API Demo Site",
"sport_name": "Ice Hockey"
},
"thumbnails": {},
"subseason_ids": [
291621
]
}
{"_id":"56f417d60f1f970e006e24a1","parentDoc":null,"sync_unique":"","__v":4,"editedParams2":true,"excerpt":"The Show method returns a single Season for a given `id`.\n\n###Parameters","hidden":false,"link_url":"","order":21,"api":{"examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/seasons/267440\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/seasons/267440\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/seasons/267440\")\n .get()\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"default":"","type":"int","name":"id","in":"path","_id":"56fd7f18e7f3080e008e3e85","ref":"","required":true,"desc":""}],"results":{"codes":[{"language":"json","code":"{\n \"id\": 267440,\n \"name\": \"2016\",\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n \"solo_team_league_id\": null,\n \"has_metadata\": null,\n \"show_shared_schedule\": false,\n \"stat_preference\": {\n \"id\": 292407,\n \"updated_on\": \"2016-03-22T12:46:58-07:00\",\n \"created_on\": \"2016-03-22T12:46:58-07:00\",\n \"game_defaults\": {\n \"auto_navigate_to_play_details\": true,\n \"field_of_play_enabled\": false,\n \"game_misconduct_time\": 0,\n \"ice_hockey_goalie_order_by\": null,\n \"ice_hockey_goalie_order_by_secondary\": null,\n \"ice_hockey_goalie_order_dir\": null,\n \"ice_hockey_goalie_order_dir_secondary\": null,\n \"ice_hockey_goalie_stat_qualify_by\": null,\n \"ice_hockey_goalie_stat_qualify_val\": null,\n \"ice_hockey_skater_order_by\": null,\n \"ice_hockey_skater_order_by_secondary\": null,\n \"ice_hockey_skater_order_dir\": null,\n \"ice_hockey_skater_order_dir_secondary\": null,\n \"ice_hockey_skater_stat_qualify_by\": null,\n \"ice_hockey_skater_stat_qualify_val\": null,\n \"ice_hockey_team_scoring_order_by\": \"pts\",\n \"ice_hockey_team_scoring_order_by_secondary\": null,\n \"ice_hockey_team_scoring_order_dir\": \"desc\",\n \"ice_hockey_team_scoring_order_dir_secondary\": null,\n \"ice_hockey_team_scoring_stat_qualify_by\": null,\n \"ice_hockey_team_scoring_stat_qualify_val\": null,\n \"ice_hockey_team_stats_order_by\": null,\n \"ice_hockey_team_stats_order_by_secondary\": null,\n \"ice_hockey_team_stats_order_dir\": null,\n \"ice_hockey_team_stats_order_dir_secondary\": null,\n \"ice_hockey_team_stats_stat_qualify_by\": null,\n \"ice_hockey_team_stats_stat_qualify_val\": null,\n \"intermission_length\": 1,\n \"major_adjustment_time\": 0,\n \"major_penalty_time\": 5,\n \"match_penalty_time\": 5,\n \"max_goal_differential\": 0,\n \"max_player_major_penalties\": 2,\n \"max_player_penalties\": 5,\n \"max_team_penalties\": 15,\n \"minor_adjustment_time\": 0,\n \"minor_penalty_time\": 2,\n \"misconduct_time\": 10,\n \"overtime_intervals\": 2,\n \"overtime_length\": \"5\",\n \"post_live_updates\": true,\n \"regulation_time_intervals\": null,\n \"shootout_enabled\": false,\n \"stop_run_time\": true,\n \"time_interval_name\": \"period\",\n \"time_intervals\": [\n \"20\",\n \"20\",\n \"20\"\n ],\n \"timeout_time\": 1,\n \"timeouts\": 1,\n \"track_goal_types\": true,\n \"track_player_sog\": true,\n \"warmup_length\": 5\n },\n \"season_id\": 267440,\n \"original_scorer_can_edit\": null,\n \"force_real_time_scoring\": false,\n \"stat_tool_id\": 1848623,\n \"stats_can_be_unlinked\": null,\n \"scoring_methods\": \"--- \\n- live\\n- mass\\n- tabular\\n- quick\\n\",\n \"can_edit_final\": \"league_owner\",\n \"traded_player_stats\": null,\n \"game_sheet_auto_summary_enabled\": true,\n \"visible_stats\": \"league_xor_division\"\n },\n \"subseasons\": [\n {\n \"id\": 291621,\n \"name\": \"Regular Season\",\n \"season_id\": 267440,\n \"position\": 1,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-04-14T09:43:56-07:00\",\n \"snl_scoring_enabled\": true,\n \"statistic_grouping_id\": 417884,\n \"workers_completed\": null,\n \"standing_preference\": {\n \"id\": 110425,\n \"standing_tool_id\": 1848627,\n \"standing_type_id\": 5,\n \"standings_aggregation_level\": \"league\",\n \"qualifiers\": null,\n \"qualifier_limit\": null,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n \"winning_team_custom_points\": null,\n \"losing_team_custom_points\": null,\n \"tied_team_custom_points\": null,\n \"label_mapping\": {},\n \"extended_fields\": [\n \"win_count\",\n \"loss_count\",\n \"tie_count\",\n \"points\"\n ],\n \"order_rule\": 1,\n \"overtime_win_custom_points\": null,\n \"overtime_loss_custom_points\": null,\n \"overtime_wins_include_in_wins\": true,\n \"overtime_losses_include_in_losses\": true,\n \"legacy_custom_points\": false\n },\n \"live_scoring_stat_configuration\": {\n \"show_plus_minus\": null,\n \"fair_play_points\": false\n }\n }\n ]\n}","name":"","status":200}]},"settings":"","url":"/seasons/:id","auth":"required"},"editedParams":true,"project":"5641217e0ee5370d00da636d","slug":"seasons-show","type":"get","version":"56cca51eca43550b002813fa","body":"###Attributes\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Attribute\",\n \"h-1\": \"Type\",\n \"h-2\": \"Notes\",\n \"0-0\": \"id\",\n \"0-1\": \"Integer\",\n \"0-2\": \"Unique id assigned by NGIN\",\n \"1-0\": \"name\",\n \"1-1\": \"String\",\n \"1-2\": \"Name of the season\",\n \"2-0\": \"stat_prefence\",\n \"2-1\": \"Hash\",\n \"2-2\": \"Information about stat preferences for the season\",\n \"3-0\": \"roster_enabled\",\n \"3-1\": \"Boolean\",\n \"3-2\": \"Whether or not team_instances for the season will have rosters\",\n \"4-0\": \"schedule_enabled\",\n \"4-1\": \"Boolean\",\n \"4-2\": \"Whether or not to display games for this season in the game schedule\",\n \"5-0\": \"statistics_enabld\",\n \"5-1\": \"Boolean\",\n \"5-2\": \"Whether or not to calculate statistics for the season\",\n \"6-0\": \"created_at\",\n \"6-1\": \"Datetime\",\n \"7-0\": \"updated_at\",\n \"7-1\": \"Datetime\",\n \"6-2\": \"Timestamp of creation date\",\n \"7-2\": \"Timestamp of last update\"\n },\n \"cols\": 3,\n \"rows\": 8\n}\n[/block]\n###Stat_Preference Hash Attributes\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Attribute\",\n \"h-1\": \"Type\",\n \"h-2\": \"Notes\",\n \"0-0\": \"id\",\n \"0-1\": \"Integer\",\n \"0-2\": \"Unique id assigned by NGIN\",\n \"1-0\": \"season_id\",\n \"1-1\": \"Integer\",\n \"1-2\": \"id of the season assigned by NGIN\",\n \"2-0\": \"force_real_time_scoring\",\n \"2-1\": \"Boolean\",\n \"2-2\": \"Whether or not to require all scoring to be done with Sport NGIN Live\",\n \"3-0\": \"original_scorer_can_edit\",\n \"3-1\": \"Boolean\",\n \"3-2\": \"Whether or not the original scorer is able to edit the stats\",\n \"4-0\": \"required_roster_fields\",\n \"4-1\": \"Array\",\n \"4-2\": \"List of required fields for rosters\",\n \"5-0\": \"email_list\",\n \"5-1\": \"String\",\n \"5-2\": \"List of emails to send updates to\",\n \"6-0\": \"email_time\",\n \"6-1\": \"Datetime\",\n \"6-2\": \"Time of day to send email updates\",\n \"7-0\": \"game_defaults\",\n \"7-1\": \"Hash\",\n \"7-2\": \"Sport specific defaults for games in this season\",\n \"8-0\": \"created_on\",\n \"9-0\": \"updated_on\",\n \"8-1\": \"Datetime\",\n \"9-1\": \"Datetime\",\n \"8-2\": \"Timestamp of creation date\",\n \"9-2\": \"Timestamp of last update\"\n },\n \"cols\": 3,\n \"rows\": 10\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Hint\",\n \"body\": \"Stat_Preference may return other sport specific fields.\"\n}\n[/block]","createdAt":"2016-03-24T16:37:42.300Z","updates":[],"user":"56e71f9edee212320019e731","category":"56e03709f97d422900d63922","githubsync":"","isReference":true,"link_external":false,"title":"Seasons Show","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getSeasons Show
Path Params
id
Integer
Unique id assigned by NGIN
name
String
Name of the season
stat_prefence
Hash
Information about stat preferences for the season
roster_enabled
Boolean
Whether or not team_instances for the season will have rosters
schedule_enabled
Boolean
Whether or not to display games for this season in the game schedule
statistics_enabld
Boolean
Whether or not to calculate statistics for the season
created_at
Datetime
Timestamp of creation date
updated_at
Datetime
Timestamp of last update
id
Integer
Unique id assigned by NGIN
season_id
Integer
id of the season assigned by NGIN
force_real_time_scoring
Boolean
Whether or not to require all scoring to be done with Sport NGIN Live
original_scorer_can_edit
Boolean
Whether or not the original scorer is able to edit the stats
required_roster_fields
Array
List of required fields for rosters
email_list
String
List of emails to send updates to
email_time
Datetime
Time of day to send email updates
game_defaults
Hash
Sport specific defaults for games in this season
created_on
Datetime
Timestamp of creation date
updated_on
Datetime
Timestamp of last update
Hint
Stat_Preference may return other sport specific fields.
Definition
Examples
curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/seasons/267440"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/seasons/267440")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.sportngin.com/seasons/267440")
.get()
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.build();
Response response = client.newCall(request).execute();
Result Format
{
"id": 267440,
"name": "2016",
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"solo_team_league_id": null,
"has_metadata": null,
"show_shared_schedule": false,
"stat_preference": {
"id": 292407,
"updated_on": "2016-03-22T12:46:58-07:00",
"created_on": "2016-03-22T12:46:58-07:00",
"game_defaults": {
"auto_navigate_to_play_details": true,
"field_of_play_enabled": false,
"game_misconduct_time": 0,
"ice_hockey_goalie_order_by": null,
"ice_hockey_goalie_order_by_secondary": null,
"ice_hockey_goalie_order_dir": null,
"ice_hockey_goalie_order_dir_secondary": null,
"ice_hockey_goalie_stat_qualify_by": null,
"ice_hockey_goalie_stat_qualify_val": null,
"ice_hockey_skater_order_by": null,
"ice_hockey_skater_order_by_secondary": null,
"ice_hockey_skater_order_dir": null,
"ice_hockey_skater_order_dir_secondary": null,
"ice_hockey_skater_stat_qualify_by": null,
"ice_hockey_skater_stat_qualify_val": null,
"ice_hockey_team_scoring_order_by": "pts",
"ice_hockey_team_scoring_order_by_secondary": null,
"ice_hockey_team_scoring_order_dir": "desc",
"ice_hockey_team_scoring_order_dir_secondary": null,
"ice_hockey_team_scoring_stat_qualify_by": null,
"ice_hockey_team_scoring_stat_qualify_val": null,
"ice_hockey_team_stats_order_by": null,
"ice_hockey_team_stats_order_by_secondary": null,
"ice_hockey_team_stats_order_dir": null,
"ice_hockey_team_stats_order_dir_secondary": null,
"ice_hockey_team_stats_stat_qualify_by": null,
"ice_hockey_team_stats_stat_qualify_val": null,
"intermission_length": 1,
"major_adjustment_time": 0,
"major_penalty_time": 5,
"match_penalty_time": 5,
"max_goal_differential": 0,
"max_player_major_penalties": 2,
"max_player_penalties": 5,
"max_team_penalties": 15,
"minor_adjustment_time": 0,
"minor_penalty_time": 2,
"misconduct_time": 10,
"overtime_intervals": 2,
"overtime_length": "5",
"post_live_updates": true,
"regulation_time_intervals": null,
"shootout_enabled": false,
"stop_run_time": true,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
],
"timeout_time": 1,
"timeouts": 1,
"track_goal_types": true,
"track_player_sog": true,
"warmup_length": 5
},
"season_id": 267440,
"original_scorer_can_edit": null,
"force_real_time_scoring": false,
"stat_tool_id": 1848623,
"stats_can_be_unlinked": null,
"scoring_methods": "--- \n- live\n- mass\n- tabular\n- quick\n",
"can_edit_final": "league_owner",
"traded_player_stats": null,
"game_sheet_auto_summary_enabled": true,
"visible_stats": "league_xor_division"
},
"subseasons": [
{
"id": 291621,
"name": "Regular Season",
"season_id": 267440,
"position": 1,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-04-14T09:43:56-07:00",
"snl_scoring_enabled": true,
"statistic_grouping_id": 417884,
"workers_completed": null,
"standing_preference": {
"id": 110425,
"standing_tool_id": 1848627,
"standing_type_id": 5,
"standings_aggregation_level": "league",
"qualifiers": null,
"qualifier_limit": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"winning_team_custom_points": null,
"losing_team_custom_points": null,
"tied_team_custom_points": null,
"label_mapping": {},
"extended_fields": [
"win_count",
"loss_count",
"tie_count",
"points"
],
"order_rule": 1,
"overtime_win_custom_points": null,
"overtime_loss_custom_points": null,
"overtime_wins_include_in_wins": true,
"overtime_losses_include_in_losses": true,
"legacy_custom_points": false
},
"live_scoring_stat_configuration": {
"show_plus_minus": null,
"fair_play_points": false
}
}
]
}
{"_id":"56f439f0e2d47b0e005fe91c","body":"###Attributes\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Attribute\",\n \"h-1\": \"Type\",\n \"h-2\": \"Notes\",\n \"0-0\": \"id\",\n \"0-1\": \"Integer\",\n \"0-2\": \"Unique id assigned by NGIN\",\n \"1-0\": \"season_id\",\n \"1-1\": \"Integer\",\n \"1-2\": \"id of the season assigned by NGIN\",\n \"2-0\": \"name\",\n \"2-1\": \"String\",\n \"2-2\": \"name for the subseason\",\n \"3-0\": \"standing_type_id\",\n \"3-1\": \"Integer\",\n \"3-2\": \"id of the standings assigned by NGIN\",\n \"4-0\": \"qaulifiers\",\n \"4-1\": \"Integer\",\n \"4-2\": \"number of possible qaulifiers\",\n \"5-0\": \"qaulifier_limit\",\n \"5-1\": \"Integer\",\n \"5-2\": \"Upper limit of the number of qualifiers\",\n \"6-0\": \"standings_aggregation_level\",\n \"6-1\": \"String\",\n \"6-2\": \"Level the standings are build at\",\n \"7-0\": \"snl_scoring_enabled\",\n \"7-1\": \"Boolean\",\n \"7-2\": \"Weather or not Sport NGIN Live is enabled for the subseason\",\n \"8-0\": \"position\",\n \"8-1\": \"Integer\",\n \"8-2\": \"Order of the subseasons in a season\",\n \"9-0\": \"created_at\",\n \"9-1\": \"Datetime\",\n \"9-2\": \"Timestamp of creation date\",\n \"10-0\": \"Updated_at\",\n \"10-1\": \"Datetime\",\n \"10-2\": \"Timestamp of last update\"\n },\n \"cols\": 3,\n \"rows\": 11\n}\n[/block]\n###Standings Type ID Mapping\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"standing_type_id\",\n \"h-1\": \"name\",\n \"h-2\": \"description\",\n \"h-3\": \"sport_id\",\n \"0-0\": \"1\",\n \"1-0\": \"2\",\n \"2-0\": \"3\",\n \"3-0\": \"4\",\n \"4-0\": \"5\",\n \"5-0\": \"6\",\n \"6-0\": \"7\",\n \"7-0\": \"8\",\n \"8-0\": \"9\",\n \"9-0\": \"10\",\n \"10-0\": \"11\",\n \"11-0\": \"12\",\n \"12-0\": \"13\",\n \"13-0\": \"14\",\n \"14-0\": \"15\",\n \"15-0\": \"16\",\n \"16-0\": \"17\",\n \"0-3\": \"1\",\n \"1-3\": \"1\",\n \"2-3\": \"4\",\n \"3-3\": \"5\",\n \"4-3\": \"1\",\n \"5-3\": \"3\",\n \"6-3\": \"11\",\n \"7-3\": \"7\",\n \"8-3\": \"3\",\n \"10-3\": \"16\",\n \"11-3\": \"16\",\n \"13-3\": \"1\",\n \"14-3\": \"19\",\n \"15-3\": \"12\",\n \"16-3\": \"3\",\n \"0-1\": \"Hockey - NHL Classic with FPP\",\n \"1-1\": \"Hockey - NHL Classic\",\n \"2-1\": \"Baseball - MLB\",\n \"3-1\": \"Soccer - Universal\",\n \"4-1\": \"Hockey - NHL Current\",\n \"5-1\": \"Lacrosse - MLL\",\n \"6-1\": \"Football - NFL\",\n \"7-1\": \"Basketball - NBA\",\n \"8-1\": \"Box Lacrosse\",\n \"9-1\": \"Seeded Single Elimination Bracket\",\n \"10-1\": \"Rugby Union With Bonus Points\",\n \"11-1\": \"Rugby Union Without Bonus Points\",\n \"12-1\": \"Custom Points\",\n \"13-1\": \"Hockey - Pond Hockey\",\n \"14-1\": \"Ultimate\",\n \"15-1\": \"Volleyball\",\n \"16-1\": \"Lacrosse - NLL\",\n \"0-2\": \"Identical to NHL Classic, but with the addition of Fair Play Points (FPP).\",\n \"1-2\": \"Teams receive 2 points for a win and 1 for a tie. Teams are ordered by points, then wins, then losses (ascending), and then by games played (ascending).\",\n \"2-2\": \"Teams are ordered by games behind, then winning percentage, and then wins.\",\n \"3-2\": \"Teams receive 3 points for a win and 1 point for a tie. Teams are ordered by points, then wins, then losses (ascending), and then by games played (ascending).\",\n \"4-2\": \"Teams receive 2 points for a win, 1 for a tie, and 1 for an overtime loss. Teams are ordered by points, then wins, then losses (ascending), and then by games played (ascending).\",\n \"5-2\": \"Teams are ordered by games behind, then winning percentage, and then wins.\",\n \"6-2\": \"Teams are ordered by games behind, then winning percentage, and then wins.\",\n \"7-2\": \"Teams are ordered by games behind, then winning percentage, and then wins.\",\n \"8-2\": \"Teams are ordered by games behind, then winning percentage, and then wins.\",\n \"9-2\": \"Teams are seeded and play games within a single-elimination bracket.\",\n \"10-2\": \"Teams receive 4 points for a win and 2 for a tie. The losing team receives 1 point if they lost by 7 or less, and both teams receive a point if they have 4 or more tries. Teams are ordered by points, then wins, then losses (ascending), and then by games p\",\n \"11-2\": \"Teams receive 4 points for a win and 2 for a tie. Teams are ordered by points, then wins, then losses (ascending), and then by games played (ascending).\",\n \"12-2\": \"Points for the winning, losing, and tying teams are assigned for each game independently. Teams are ordered by points, then wins, then losses (ascending), and then by games played (ascending).\",\n \"13-2\": \"Teams receive 3 points for a win and 0 for a loss, no ties. Teams are ordered by points, then goals against, then goals for (ascending).\",\n \"14-2\": \"Ultimate Standings\",\n \"15-2\": \"Volleyball Standings\",\n \"16-2\": \"Identical to Lacrosse - MLL, but with no tie game option\"\n },\n \"cols\": 4,\n \"rows\": 17\n}\n[/block]","createdAt":"2016-03-24T19:03:12.924Z","editedParams2":true,"link_url":"","sync_unique":"","title":"Subseasons Show","project":"5641217e0ee5370d00da636d","__v":5,"category":"56e03709f97d422900d63922","excerpt":"The Show method returns a single Subseason for a given `id`.\n\n###Parameters","githubsync":"","hidden":false,"parentDoc":null,"type":"get","updates":[],"editedParams":true,"isReference":true,"order":22,"slug":"subseasons-show","user":"56e71f9edee212320019e731","api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n \"id\": 291621,\n \"name\": \"Regular Season\",\n \"season_id\": 267440,\n \"position\": 1,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-04-14T09:36:29-07:00\",\n \"snl_scoring_enabled\": true,\n \"statistic_grouping_id\": 417884,\n \"workers_completed\": null,\n \"standing_preference\": {\n \"id\": 110425,\n \"standing_tool_id\": 1848627,\n \"standing_type_id\": 5,\n \"standings_aggregation_level\": \"league\",\n \"qualifiers\": null,\n \"qualifier_limit\": null,\n \"created_at\": \"2016-03-22T12:46:58-07:00\",\n \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n \"winning_team_custom_points\": null,\n \"losing_team_custom_points\": null,\n \"tied_team_custom_points\": null,\n \"label_mapping\": {},\n \"extended_fields\": [\n \"win_count\",\n \"loss_count\",\n \"tie_count\",\n \"points\"\n ],\n \"order_rule\": 1,\n \"overtime_win_custom_points\": null,\n \"overtime_loss_custom_points\": null,\n \"overtime_wins_include_in_wins\": true,\n \"overtime_losses_include_in_losses\": true,\n \"legacy_custom_points\": false\n },\n \"live_scoring_stat_configuration\": {\n \"show_plus_minus\": null,\n \"fair_play_points\": false\n }\n}","name":""}]},"settings":"","url":"/subseasons/:id","auth":"required","examples":{"codes":[{"code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.stage.ngin-staging.com/subseasons/291621\"","language":"curl"},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.stage.ngin-staging.com/subseasons/291621\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.stage.ngin-staging.com/subseasons/291621\")\n .get()\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"required":true,"desc":"Id of the subseason of interest.","default":"","type":"int","name":"id","in":"path","_id":"571118a8a10f7c190069811d","ref":""}]},"link_external":false,"version":"56cca51eca43550b002813fa","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getSubseasons Show
Path Params
id
Integer
Unique id assigned by NGIN
season_id
Integer
id of the season assigned by NGIN
name
String
name for the subseason
standing_type_id
Integer
id of the standings assigned by NGIN
qaulifiers
Integer
number of possible qaulifiers
qaulifier_limit
Integer
Upper limit of the number of qualifiers
standings_aggregation_level
String
Level the standings are build at
snl_scoring_enabled
Boolean
Weather or not Sport NGIN Live is enabled for the subseason
position
Integer
Order of the subseasons in a season
created_at
Datetime
Timestamp of creation date
Updated_at
Datetime
Timestamp of last update
1
Hockey - NHL Classic with FPP
Identical to NHL Classic, but with the addition of Fair Play Points (FPP).
1
2
Hockey - NHL Classic
Teams receive 2 points for a win and 1 for a tie. Teams are ordered by points, then wins, then losses (ascending), and then by games played (ascending).
1
3
Baseball - MLB
Teams are ordered by games behind, then winning percentage, and then wins.
4
4
Soccer - Universal
Teams receive 3 points for a win and 1 point for a tie. Teams are ordered by points, then wins, then losses (ascending), and then by games played (ascending).
5
5
Hockey - NHL Current
Teams receive 2 points for a win, 1 for a tie, and 1 for an overtime loss. Teams are ordered by points, then wins, then losses (ascending), and then by games played (ascending).
1
6
Lacrosse - MLL
Teams are ordered by games behind, then winning percentage, and then wins.
3
7
Football - NFL
Teams are ordered by games behind, then winning percentage, and then wins.
11
8
Basketball - NBA
Teams are ordered by games behind, then winning percentage, and then wins.
7
9
Box Lacrosse
Teams are ordered by games behind, then winning percentage, and then wins.
3
10
Seeded Single Elimination Bracket
Teams are seeded and play games within a single-elimination bracket.
11
Rugby Union With Bonus Points
Teams receive 4 points for a win and 2 for a tie. The losing team receives 1 point if they lost by 7 or less, and both teams receive a point if they have 4 or more tries. Teams are ordered by points, then wins, then losses (ascending), and then by games p
16
12
Rugby Union Without Bonus Points
Teams receive 4 points for a win and 2 for a tie. Teams are ordered by points, then wins, then losses (ascending), and then by games played (ascending).
16
13
Custom Points
Points for the winning, losing, and tying teams are assigned for each game independently. Teams are ordered by points, then wins, then losses (ascending), and then by games played (ascending).
14
Hockey - Pond Hockey
Teams receive 3 points for a win and 0 for a loss, no ties. Teams are ordered by points, then goals against, then goals for (ascending).
1
15
Ultimate
Ultimate Standings
19
16
Volleyball
Volleyball Standings
12
17
Lacrosse - NLL
Identical to Lacrosse - MLL, but with no tie game option
3
Definition
Examples
curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.stage.ngin-staging.com/subseasons/291621"
require 'uri'
require 'net/http'
url = URI("https://api.stage.ngin-staging.com/subseasons/291621")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.stage.ngin-staging.com/subseasons/291621")
.get()
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.build();
Response response = client.newCall(request).execute();
Result Format
{
"id": 291621,
"name": "Regular Season",
"season_id": 267440,
"position": 1,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-04-14T09:36:29-07:00",
"snl_scoring_enabled": true,
"statistic_grouping_id": 417884,
"workers_completed": null,
"standing_preference": {
"id": 110425,
"standing_tool_id": 1848627,
"standing_type_id": 5,
"standings_aggregation_level": "league",
"qualifiers": null,
"qualifier_limit": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"winning_team_custom_points": null,
"losing_team_custom_points": null,
"tied_team_custom_points": null,
"label_mapping": {},
"extended_fields": [
"win_count",
"loss_count",
"tie_count",
"points"
],
"order_rule": 1,
"overtime_win_custom_points": null,
"overtime_loss_custom_points": null,
"overtime_wins_include_in_wins": true,
"overtime_losses_include_in_losses": true,
"legacy_custom_points": false
},
"live_scoring_stat_configuration": {
"show_plus_minus": null,
"fair_play_points": false
}
}
{"_id":"56fefa68cd877c0e00a42f22","link_url":"","title":"Events","__v":13,"api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"excerpt":"An Event has a name, description, location, date and time. Events are often created manually on a Calendar Page in Sitebuilder, but they can also be created through this API.\n\nA [Game](ref:games-show) holds all pertinent competition-related information for an [Event](https://sportnginv2.readme.io/docs/events) in SportsEngine. *This is easy to remember: [Games](https://sportnginv2.readme.io/docs/games-show) are really just a _type_ of Event, but _not necessarily the other way around!_*\n\n###Associations\nAn Event belongs to a [Content Node](https://sportnginsite.readme.io/docs/content-node), and can have a [Game](https://sportnginv2.readme.io/docs/games-show), a Dib Item, or a [Survey](https://sportnginv2.readme.io/docs/surveys).\n\nA [Game](ref:games-index) is always paired with an [Event](https://sportnginv2.readme.io/docs/events), and belongs to [Team Instances](https://sportnginv2.readme.io/docs/team-instances-show), [Subseasons](https://sportnginv2.readme.io/docs/subseasons-show).\n\nA [Game](ref:games-show) can have [Scoring Plays](https://sportnginv2.readme.io/docs/scoring-plays), [Posts](https://sportnginsite.readme.io/docs/posts), [Photos](https://sportnginsite.readme.io/docs/photo), [Video](https://sportnginsite.readme.io/docs/video), [News Articles](https://sportnginsite.readme.io/docs/news-articles), [Game Player Stats](https://sportnginv2.readme.io/docs/game-player-stats), and [Game Team Stats](https://sportnginv2.readme.io/docs/https://sportnginv2.readme.io/docs/game-team-stats).","link_external":false,"createdAt":"2016-04-01T22:47:04.671Z","sync_unique":"","updates":[],"project":"5641217e0ee5370d00da636d","slug":"events","type":"basic","version":"56cca51eca43550b002813fa","category":"56cca51eca43550b00281403","githubsync":"","hidden":false,"parentDoc":null,"body":"[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Hint\",\n \"body\": \"[Games News Articles Create](ref:games-news-articles-create) is used to attach a [News Articles](ref:news-articles) to a [Game](ref:games-index).\"\n}\n[/block]","isReference":true,"order":0,"user":"56cbf1419f4ae20b00644fde","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
Events
Hint
Games News Articles Create is used to attach a News Articles to a Game.
{"_id":"56cca522ca43550b00281417","body":"","createdAt":"2016-01-14T16:57:11.569Z","isReference":true,"link_url":"","updates":[],"editedParams2":true,"order":1,"project":"5641217e0ee5370d00da636d","sync_unique":"","title":"Events Index","user":"5678311948c8d00d0094b803","__v":6,"githubsync":"","link_external":false,"parentDoc":null,"api":{"params":[{"_id":"56e9b394c3db7f1900f1a101","ref":"","in":"query","required":true,"desc":"Comma separated list of ids for Subseasons.","default":"","type":"string","name":"subseason_ids"},{"_id":"56e9b394c3db7f1900f1a100","ref":"","in":"query","required":true,"desc":"ID of a Team.","default":"","type":"int","name":"team_id"},{"_id":"56e9b394c3db7f1900f1a0ff","ref":"","in":"query","required":true,"desc":"Comma separated list of IDs for Teams.","default":"","type":"string","name":"team_ids"},{"_id":"5723af6bebe0d70e00131967","ref":"","in":"query","required":true,"desc":"Id of site events belong to. scope=site param required when passing site_id.","default":"","type":"int","name":"site_id"},{"_id":"56e9b394c3db7f1900f1a0fe","ref":"","in":"query","required":true,"desc":"Comma separated list of IDs for PageNodes.","default":"","type":"string","name":"page_node_ids"},{"_id":"56e9b394c3db7f1900f1a0fd","ref":"","in":"query","required":false,"desc":"When selecting by team, only select events for the current subseason.","default":"","type":"boolean","name":"current_subseason_only"},{"_id":"5697d45d3503e40d0061f492","ref":"","in":"query","required":false,"desc":"Start of date range for query.","default":"","type":"datetime","name":"start_date"},{"_id":"5697d45d3503e40d0061f491","ref":"","in":"query","required":false,"desc":"End of date range for query.","default":"","type":"datetime","name":"end_date"},{"_id":"5697d45d3503e40d0061f494","ref":"","in":"query","required":false,"desc":"Page of result set.","default":"","type":"int","name":"page"},{"_id":"5697d45d3503e40d0061f493","ref":"","in":"query","required":false,"desc":"Size of result set.","default":"","type":"int","name":"limit"},{"_id":"56e9b394c3db7f1900f1a0fc","ref":"","in":"query","required":false,"desc":"Direction of sorting. Possible values are asc or desc.","default":"asc","type":"string","name":"sort"}],"results":{"codes":[{"name":"Regular Response","code":"{\n \"events\": [\n {\n \"id\": 306927600,\n \"title\": \"Boston Bears Event\",\n \"description\": null,\n \"location\": \"\",\n \"location_url\": \"\",\n \"start_date_time\": \"2016-04-07T10:00:00-05:00\",\n \"end_date_time\": \"2016-04-07T10:00:00-05:00\",\n \"updated_on\": \"2016-04-06T11:54:38-07:00\",\n \"created_on\": \"2016-04-06T11:54:38-07:00\",\n \"imported_event_flag\": false,\n \"all_day_event\": false,\n \"event_type\": null,\n \"recur_interval\": \"none\",\n \"recur_interval_value\": null,\n \"recur_week_sunday\": false,\n \"recur_week_monday\": false,\n \"recur_week_tuesday\": false,\n \"recur_week_wednesday\": false,\n \"recur_week_thursday\": false,\n \"recur_week_friday\": false,\n \"recur_week_saturday\": false,\n \"recur_month_repeat_by\": null,\n \"recur_end_date\": null,\n \"action\": \"_self\",\n \"protocol\": \"\",\n \"background_schedule_import_id\": null,\n \"event_import_id\": null,\n \"content_node_id\": null,\n \"ical_feed_id\": null,\n \"ical_uid\": null,\n \"layout_template\": \"two_panel\",\n \"utc_start_date_time\": \"2016-04-07T15:00:00-07:00\",\n \"utc_end_date_time\": \"2016-04-07T15:00:00-07:00\",\n \"local_timezone\": \"US/Central\",\n \"game_id\": null,\n \"game\": null,\n \"has_game\": false,\n \"comment_element_id\": 288944370,\n \"recurring_event_originator_id\": null,\n \"full_location_url\": \"\"\n },\n {\n \"id\": 307398486,\n \"title\": \"Boston Bears Event\",\n \"description\": null,\n \"location\": \"\",\n \"location_url\": \"\",\n \"start_date_time\": \"2016-04-07T18:00:00-05:00\",\n \"end_date_time\": \"2016-04-07T18:00:00-05:00\",\n \"updated_on\": \"2016-04-07T11:56:17-07:00\",\n \"created_on\": \"2016-04-07T11:56:17-07:00\",\n \"imported_event_flag\": false,\n \"all_day_event\": false,\n \"event_type\": null,\n \"recur_interval\": \"none\",\n \"recur_interval_value\": null,\n \"recur_week_sunday\": false,\n \"recur_week_monday\": false,\n \"recur_week_tuesday\": false,\n \"recur_week_wednesday\": false,\n \"recur_week_thursday\": false,\n \"recur_week_friday\": false,\n \"recur_week_saturday\": false,\n \"recur_month_repeat_by\": null,\n \"recur_end_date\": null,\n \"action\": \"_self\",\n \"protocol\": \"\",\n \"background_schedule_import_id\": null,\n \"event_import_id\": null,\n \"content_node_id\": null,\n \"ical_feed_id\": null,\n \"ical_uid\": null,\n \"layout_template\": \"two_panel\",\n \"utc_start_date_time\": \"2016-04-07T23:00:00-07:00\",\n \"utc_end_date_time\": \"2016-04-07T23:00:00-07:00\",\n \"local_timezone\": \"US/Central\",\n \"game_id\": null,\n \"game\": null,\n \"has_game\": false,\n \"comment_element_id\": 289424103,\n \"recurring_event_originator_id\": null,\n \"full_location_url\": \"\"\n },\n...\n ],\n \"more\": true\n}","language":"json","status":200},{"name":"Connections Response","status":200,"language":"json","code":"[\n {\n \"id\": 61356511,\n \"title\": \"2nd Annual \\\"Grow The Game\\\" Night - Black out night\",\n \"description\": \"<p>Wine tasting, great music, and great Storm friends. Come on out to the 2nd Annual Storm hockey Grow the Game Night. Help raise money for the financial assistance fund while having a great time with great friends.</p>\\n\\n<p>More information will be forthcoming.</p>\\n\",\n \"location\": \"Location TBD\",\n \"location_url\": \"\",\n \"start_date_time\": \"2014-01-31T19:00:00-06:00\",\n \"end_date_time\": \"2014-01-31T23:00:00-06:00\",\n \"updated_on\": \"2013-11-24T23:07:39-08:00\",\n \"created_on\": \"2013-11-24T23:07:38-08:00\",\n \"imported_event_flag\": false,\n \"all_day_event\": false,\n \"event_type\": null,\n \"recur_interval\": \"none\",\n \"recur_interval_value\": null,\n \"recur_week_sunday\": false,\n \"recur_week_monday\": false,\n \"recur_week_tuesday\": false,\n \"recur_week_wednesday\": false,\n \"recur_week_thursday\": false,\n \"recur_week_friday\": false,\n \"recur_week_saturday\": false,\n \"recur_month_repeat_by\": null,\n \"recur_end_date\": null,\n \"action\": \"_self\",\n \"protocol\": \"\",\n \"background_schedule_import_id\": null,\n \"event_import_id\": null,\n \"content_node_id\": null,\n \"ical_feed_id\": null,\n \"ical_uid\": null,\n \"layout_template\": \"two_panel\",\n \"utc_start_date_time\": null,\n \"utc_end_date_time\": null,\n \"local_timezone\": \"America/Chicago\",\n \"game_id\": null,\n \"game\": null,\n \"has_game\": false,\n \"comment_element_id\": 37613994,\n \"recurring_event_originator_id\": null,\n \"full_location_url\": \"\"\n },\n {\n \"id\": 143333662,\n \"title\": \"NHL Alumni - Storm End Of Year Bash\",\n \"description\": \"\",\n \"location\": \"Parade Ice Gardens\",\n \"location_url\": \"\",\n \"start_date_time\": \"2015-03-21T15:00:00-05:00\",\n \"end_date_time\": \"2015-03-21T18:00:00-05:00\",\n \"updated_on\": \"2015-02-11T09:34:34-08:00\",\n \"created_on\": \"2015-02-11T09:34:33-08:00\",\n \"imported_event_flag\": false,\n \"all_day_event\": false,\n \"event_type\": null,\n \"recur_interval\": \"none\",\n \"recur_interval_value\": null,\n \"recur_week_sunday\": false,\n \"recur_week_monday\": false,\n \"recur_week_tuesday\": false,\n \"recur_week_wednesday\": false,\n \"recur_week_thursday\": false,\n \"recur_week_friday\": false,\n \"recur_week_saturday\": false,\n \"recur_month_repeat_by\": null,\n \"recur_end_date\": null,\n \"action\": \"_self\",\n \"protocol\": \"\",\n \"background_schedule_import_id\": null,\n \"event_import_id\": null,\n \"content_node_id\": 13422056,\n \"ical_feed_id\": null,\n \"ical_uid\": null,\n \"layout_template\": \"two_panel\",\n \"utc_start_date_time\": null,\n \"utc_end_date_time\": null,\n \"local_timezone\": \"America/Chicago\",\n \"game_id\": null,\n \"game\": null,\n \"has_game\": false,\n \"comment_element_id\": 122435324,\n \"recurring_event_originator_id\": null,\n \"full_location_url\": \"\"\n }\n]"}]},"settings":"","url":"/events","auth":"required","examples":{"codes":[{"code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/events?team_ids=1373611\"","language":"curl"},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/events?team_ids=1373611\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/events?team_ids=1373611\")\n .get()\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get"},"category":"56cca51eca43550b00281403","editedParams":true,"excerpt":"The Index method returns an array of Events matching the given parameters. At least one of the required parameters must be included in the request.\n\n###Parameters","hidden":false,"slug":"events-index","type":"get","version":"56cca51eca43550b002813fa","next":{"description":"","pages":[]},"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getEvents Index
Query Params
Definition
Examples
curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/events?team_ids=1373611"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/events?team_ids=1373611")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.sportngin.com/events?team_ids=1373611")
.get()
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.build();
Response response = client.newCall(request).execute();
Result Format
{
"events": [
{
"id": 306927600,
"title": "Boston Bears Event",
"description": null,
"location": "",
"location_url": "",
"start_date_time": "2016-04-07T10:00:00-05:00",
"end_date_time": "2016-04-07T10:00:00-05:00",
"updated_on": "2016-04-06T11:54:38-07:00",
"created_on": "2016-04-06T11:54:38-07:00",
"imported_event_flag": false,
"all_day_event": false,
"event_type": null,
"recur_interval": "none",
"recur_interval_value": null,
"recur_week_sunday": false,
"recur_week_monday": false,
"recur_week_tuesday": false,
"recur_week_wednesday": false,
"recur_week_thursday": false,
"recur_week_friday": false,
"recur_week_saturday": false,
"recur_month_repeat_by": null,
"recur_end_date": null,
"action": "_self",
"protocol": "",
"background_schedule_import_id": null,
"event_import_id": null,
"content_node_id": null,
"ical_feed_id": null,
"ical_uid": null,
"layout_template": "two_panel",
"utc_start_date_time": "2016-04-07T15:00:00-07:00",
"utc_end_date_time": "2016-04-07T15:00:00-07:00",
"local_timezone": "US/Central",
"game_id": null,
"game": null,
"has_game": false,
"comment_element_id": 288944370,
"recurring_event_originator_id": null,
"full_location_url": ""
},
{
"id": 307398486,
"title": "Boston Bears Event",
"description": null,
"location": "",
"location_url": "",
"start_date_time": "2016-04-07T18:00:00-05:00",
"end_date_time": "2016-04-07T18:00:00-05:00",
"updated_on": "2016-04-07T11:56:17-07:00",
"created_on": "2016-04-07T11:56:17-07:00",
"imported_event_flag": false,
"all_day_event": false,
"event_type": null,
"recur_interval": "none",
"recur_interval_value": null,
"recur_week_sunday": false,
"recur_week_monday": false,
"recur_week_tuesday": false,
"recur_week_wednesday": false,
"recur_week_thursday": false,
"recur_week_friday": false,
"recur_week_saturday": false,
"recur_month_repeat_by": null,
"recur_end_date": null,
"action": "_self",
"protocol": "",
"background_schedule_import_id": null,
"event_import_id": null,
"content_node_id": null,
"ical_feed_id": null,
"ical_uid": null,
"layout_template": "two_panel",
"utc_start_date_time": "2016-04-07T23:00:00-07:00",
"utc_end_date_time": "2016-04-07T23:00:00-07:00",
"local_timezone": "US/Central",
"game_id": null,
"game": null,
"has_game": false,
"comment_element_id": 289424103,
"recurring_event_originator_id": null,
"full_location_url": ""
},
],
"more": true
}
[
{
"id": 61356511,
"title": "2nd Annual \"Grow The Game\" Night - Black out night",
"description": "<p>Wine tasting, great music, and great Storm friends. Come on out to the 2nd Annual Storm hockey Grow the Game Night. Help raise money for the financial assistance fund while having a great time with great friends.</p>\n\n<p>More information will be forthcoming.</p>\n",
"location": "Location TBD",
"location_url": "",
"start_date_time": "2014-01-31T19:00:00-06:00",
"end_date_time": "2014-01-31T23:00:00-06:00",
"updated_on": "2013-11-24T23:07:39-08:00",
"created_on": "2013-11-24T23:07:38-08:00",
"imported_event_flag": false,
"all_day_event": false,
"event_type": null,
"recur_interval": "none",
"recur_interval_value": null,
"recur_week_sunday": false,
"recur_week_monday": false,
"recur_week_tuesday": false,
"recur_week_wednesday": false,
"recur_week_thursday": false,
"recur_week_friday": false,
"recur_week_saturday": false,
"recur_month_repeat_by": null,
"recur_end_date": null,
"action": "_self",
"protocol": "",
"background_schedule_import_id": null,
"event_import_id": null,
"content_node_id": null,
"ical_feed_id": null,
"ical_uid": null,
"layout_template": "two_panel",
"utc_start_date_time": null,
"utc_end_date_time": null,
"local_timezone": "America/Chicago",
"game_id": null,
"game": null,
"has_game": false,
"comment_element_id": 37613994,
"recurring_event_originator_id": null,
"full_location_url": ""
},
{
"id": 143333662,
"title": "NHL Alumni - Storm End Of Year Bash",
"description": "",
"location": "Parade Ice Gardens",
"location_url": "",
"start_date_time": "2015-03-21T15:00:00-05:00",
"end_date_time": "2015-03-21T18:00:00-05:00",
"updated_on": "2015-02-11T09:34:34-08:00",
"created_on": "2015-02-11T09:34:33-08:00",
"imported_event_flag": false,
"all_day_event": false,
"event_type": null,
"recur_interval": "none",
"recur_interval_value": null,
"recur_week_sunday": false,
"recur_week_monday": false,
"recur_week_tuesday": false,
"recur_week_wednesday": false,
"recur_week_thursday": false,
"recur_week_friday": false,
"recur_week_saturday": false,
"recur_month_repeat_by": null,
"recur_end_date": null,
"action": "_self",
"protocol": "",
"background_schedule_import_id": null,
"event_import_id": null,
"content_node_id": 13422056,
"ical_feed_id": null,
"ical_uid": null,
"layout_template": "two_panel",
"utc_start_date_time": null,
"utc_end_date_time": null,
"local_timezone": "America/Chicago",
"game_id": null,
"game": null,
"has_game": false,
"comment_element_id": 122435324,
"recurring_event_originator_id": null,
"full_location_url": ""
}
]
{"_id":"56fabadde982ce220059ba8e","api":{"settings":"","url":"/events/:id","auth":"required","examples":{"codes":[{"code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/events/306927600\"","language":"curl"},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/events/306927600\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/events/306927600\")\n .get()\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"name":"id","ref":"","required":true,"type":"int","in":"path","_id":"56fabaf96c4e0e1900b1d7fe","default":"","desc":"ID of Event"}],"results":{"codes":[{"status":200,"name":"","code":"{\n \"id\": 306927600,\n \"title\": \"Boston Bears Event\",\n \"description\": null,\n \"location\": \"\",\n \"location_url\": \"\",\n \"start_date_time\": \"2016-04-07T10:00:00-05:00\",\n \"end_date_time\": \"2016-04-07T10:00:00-05:00\",\n \"updated_on\": \"2016-04-06T11:54:38-07:00\",\n \"created_on\": \"2016-04-06T11:54:38-07:00\",\n \"imported_event_flag\": false,\n \"all_day_event\": false,\n \"event_type\": null,\n \"recur_interval\": \"none\",\n \"recur_interval_value\": null,\n \"recur_week_sunday\": false,\n \"recur_week_monday\": false,\n \"recur_week_tuesday\": false,\n \"recur_week_wednesday\": false,\n \"recur_week_thursday\": false,\n \"recur_week_friday\": false,\n \"recur_week_saturday\": false,\n \"recur_month_repeat_by\": null,\n \"recur_end_date\": null,\n \"action\": \"_self\",\n \"protocol\": \"\",\n \"background_schedule_import_id\": null,\n \"event_import_id\": null,\n \"content_node_id\": null,\n \"ical_feed_id\": null,\n \"ical_uid\": null,\n \"layout_template\": \"two_panel\",\n \"utc_start_date_time\": \"2016-04-07T15:00:00-07:00\",\n \"utc_end_date_time\": \"2016-04-07T15:00:00-07:00\",\n \"local_timezone\": \"US/Central\",\n \"game\": null,\n \"has_game\": false,\n \"game_id\": null,\n \"comment_element_id\": 288944370,\n \"recurring_event_originator_id\": null,\n \"full_location_url\": \"\"\n}","language":"json"}]}},"createdAt":"2016-03-29T17:26:53.240Z","hidden":false,"githubsync":"","link_url":"","order":2,"parentDoc":null,"project":"5641217e0ee5370d00da636d","__v":2,"category":"56cca51eca43550b00281403","excerpt":"The Show method returns a single Event for a given `id`.\n\n###Parameters","user":"569e96c56b4a2c0d007e9153","isReference":true,"slug":"events-show","editedParams2":true,"link_external":false,"sync_unique":"","title":"Events Show","type":"get","body":"###Attributes\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Name\",\n \"h-1\": \"Type\",\n \"h-2\": \"Description\",\n \"0-0\": \"id\",\n \"1-0\": \"title\",\n \"2-0\": \"description\",\n \"3-0\": \"location\",\n \"4-0\": \"location_url\",\n \"5-0\": \"start_date_time\",\n \"6-0\": \"end_date_time\",\n \"7-0\": \"updated_on\",\n \"8-0\": \"created_on\",\n \"9-0\": \"imported_event_flag\",\n \"10-0\": \"all_day_event\",\n \"11-0\": \"event_type\",\n \"12-0\": \"recur_interval\",\n \"13-0\": \"recur_interval_value\",\n \"14-0\": \"recur_week_sunday\",\n \"15-0\": \"recur_week_monday\",\n \"16-0\": \"recur_week_tuesday\",\n \"17-0\": \"recur_week_wednesday\",\n \"18-0\": \"recur_week_thursday\",\n \"19-0\": \"recur_week_friday\",\n \"20-0\": \"recur_week_saturday\",\n \"21-0\": \"recur_month_repeat_by\",\n \"22-0\": \"recur_end_date\",\n \"23-0\": \"action\",\n \"24-0\": \"protocol\",\n \"25-0\": \"background_schedule_import_id\",\n \"26-0\": \"event_import_id\",\n \"27-0\": \"content_node_id\",\n \"28-0\": \"ical_feed_id\",\n \"29-0\": \"ical_feed_uid\",\n \"30-0\": \"layout_template\",\n \"31-0\": \"utc_start_date_time\",\n \"32-0\": \"utc_end_date_time\",\n \"33-0\": \"local_timezone\",\n \"34-0\": \"game\",\n \"35-0\": \"has_game\",\n \"36-0\": \"game_id\",\n \"37-0\": \"comment_element_id\",\n \"38-0\": \"recurring_event_originator_id\",\n \"39-0\": \"full_location_url\",\n \"40-0\": \"permissions\",\n \"0-1\": \"Integer\",\n \"1-1\": \"String\",\n \"2-1\": \"String\",\n \"3-1\": \"String\",\n \"4-1\": \"String\",\n \"5-1\": \"DateTime\",\n \"6-1\": \"DateTime\",\n \"7-1\": \"Timestamp\",\n \"8-1\": \"Timestamp\",\n \"9-1\": \"Boolean\",\n \"10-1\": \"Boolean\",\n \"11-1\": \"String\",\n \"12-1\": \"String\",\n \"13-1\": \"Integer\",\n \"14-1\": \"Boolean\",\n \"15-1\": \"Boolean\",\n \"16-1\": \"Boolean\",\n \"17-1\": \"Boolean\",\n \"18-1\": \"Boolean\",\n \"19-1\": \"Boolean\",\n \"20-1\": \"Boolean\",\n \"21-1\": \"String\",\n \"22-1\": \"DateTime\",\n \"23-1\": \"String\",\n \"24-1\": \"String\",\n \"25-1\": \"Integer\",\n \"26-1\": \"Integer\",\n \"27-1\": \"Integer\",\n \"28-1\": \"Integer\",\n \"29-1\": \"String\",\n \"30-1\": \"String\",\n \"31-1\": \"DateTime\",\n \"32-1\": \"DateTime\",\n \"33-1\": \"String\",\n \"34-1\": \"Object\",\n \"35-1\": \"Boolean\",\n \"36-1\": \"Integer\",\n \"37-1\": \"Integer\",\n \"38-1\": \"Integer\",\n \"39-1\": \"String\",\n \"40-1\": \"Object\",\n \"0-2\": \"ID of Event\",\n \"1-2\": \"Title of Event\",\n \"2-2\": \"Description of Event\",\n \"3-2\": \"Location of Event\",\n \"4-2\": \"URL of Location\",\n \"5-2\": \"Start of Event\",\n \"6-2\": \"End of Event\",\n \"7-2\": \"Timestamp when last updated\",\n \"8-2\": \"Timestamp when created\",\n \"9-2\": \"Flag for an imported Event\",\n \"10-2\": \"Flag for an \\\"all day\\\" Event\",\n \"11-2\": \"Type of Event\",\n \"14-2\": \"Repeats on Sunday\",\n \"15-2\": \"Repeats on Monday\",\n \"16-2\": \"Repeats on Tuesday\",\n \"17-2\": \"Repeats on Wednesday\",\n \"18-2\": \"Repeats on Thursday\",\n \"19-2\": \"Repeats on Friday\",\n \"20-2\": \"Repeats on Saturday\",\n \"36-2\": \"ID of Game\",\n \"34-2\": \"Game Object\",\n \"37-2\": \"ID of CommentElement\",\n \"39-2\": \"Fully constructed location URL\",\n \"40-2\": \"Update and delete permissions object\",\n \"35-2\": \"\",\n \"33-2\": \"Timezone of Event\",\n \"31-2\": \"start_date_time converted to UTC\",\n \"32-2\": \"end_date_time converted to UTC\",\n \"28-2\": \"ID of IcalFeed\",\n \"29-2\": \"UID for a singular event in an iCal feed\",\n \"27-2\": \"ID of ContentNode\",\n \"25-2\": \"ID of BackgroundScheduleImport\",\n \"12-2\": \"Interval for repeating. Possible values are none, day, week, month, or year.\",\n \"13-2\": \"Multiplier for recur_interval\",\n \"21-2\": \"Used if recur_interval is month. Possible values are day_of_month or day_of_week.\",\n \"22-2\": \"Date when to stop repeating\",\n \"23-2\": \"Action for location_url. Recommended values are _self and _blank.\",\n \"24-2\": \"Protocol of location_url. Possible values are http://, https://, or mailto://.\",\n \"26-2\": \"Used for MaxSolutions\",\n \"30-2\": \"Layout for content\"\n },\n \"cols\": 3,\n \"rows\": 41\n}\n[/block]","editedParams":true,"updates":[],"version":"56cca51eca43550b002813fa","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getEvents Show
Path Params
id
Integer
ID of Event
title
String
Title of Event
description
String
Description of Event
location
String
Location of Event
location_url
String
URL of Location
start_date_time
DateTime
Start of Event
end_date_time
DateTime
End of Event
updated_on
Timestamp
Timestamp when last updated
created_on
Timestamp
Timestamp when created
imported_event_flag
Boolean
Flag for an imported Event
all_day_event
Boolean
Flag for an "all day" Event
event_type
String
Type of Event
recur_interval
String
Interval for repeating. Possible values are none, day, week, month, or year.
recur_interval_value
Integer
Multiplier for recur_interval
recur_week_sunday
Boolean
Repeats on Sunday
recur_week_monday
Boolean
Repeats on Monday
recur_week_tuesday
Boolean
Repeats on Tuesday
recur_week_wednesday
Boolean
Repeats on Wednesday
recur_week_thursday
Boolean
Repeats on Thursday
recur_week_friday
Boolean
Repeats on Friday
recur_week_saturday
Boolean
Repeats on Saturday
recur_month_repeat_by
String
Used if recur_interval is month. Possible values are day_of_month or day_of_week.
recur_end_date
DateTime
Date when to stop repeating
action
String
Action for location_url. Recommended values are _self and _blank.
protocol
String
Protocol of location_url. Possible values are http://, https://, or mailto://.
background_schedule_import_id
Integer
ID of BackgroundScheduleImport
event_import_id
Integer
Used for MaxSolutions
content_node_id
Integer
ID of ContentNode
ical_feed_id
Integer
ID of IcalFeed
ical_feed_uid
String
UID for a singular event in an iCal feed
layout_template
String
Layout for content
utc_start_date_time
DateTime
start_date_time converted to UTC
utc_end_date_time
DateTime
end_date_time converted to UTC
local_timezone
String
Timezone of Event
game
Object
Game Object
has_game
Boolean
game_id
Integer
ID of Game
comment_element_id
Integer
ID of CommentElement
recurring_event_originator_id
Integer
full_location_url
String
Fully constructed location URL
permissions
Object
Update and delete permissions object
Definition
Examples
curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/events/306927600"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/events/306927600")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.sportngin.com/events/306927600")
.get()
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.build();
Response response = client.newCall(request).execute();
Result Format
{
"id": 306927600,
"title": "Boston Bears Event",
"description": null,
"location": "",
"location_url": "",
"start_date_time": "2016-04-07T10:00:00-05:00",
"end_date_time": "2016-04-07T10:00:00-05:00",
"updated_on": "2016-04-06T11:54:38-07:00",
"created_on": "2016-04-06T11:54:38-07:00",
"imported_event_flag": false,
"all_day_event": false,
"event_type": null,
"recur_interval": "none",
"recur_interval_value": null,
"recur_week_sunday": false,
"recur_week_monday": false,
"recur_week_tuesday": false,
"recur_week_wednesday": false,
"recur_week_thursday": false,
"recur_week_friday": false,
"recur_week_saturday": false,
"recur_month_repeat_by": null,
"recur_end_date": null,
"action": "_self",
"protocol": "",
"background_schedule_import_id": null,
"event_import_id": null,
"content_node_id": null,
"ical_feed_id": null,
"ical_uid": null,
"layout_template": "two_panel",
"utc_start_date_time": "2016-04-07T15:00:00-07:00",
"utc_end_date_time": "2016-04-07T15:00:00-07:00",
"local_timezone": "US/Central",
"game": null,
"has_game": false,
"game_id": null,
"comment_element_id": 288944370,
"recurring_event_originator_id": null,
"full_location_url": ""
}
{"_id":"56e1ba25d2f9771900df1ce1","version":"56cca51eca43550b002813fa","__v":12,"excerpt":"The Create method accepts a single Event (see attributes above) and creates a new record in SportsEngine.\n\n###Parameters","isReference":true,"link_url":"","order":3,"slug":"events-create","sync_unique":"","api":{"method":"post","params":[{"_id":"56e1bd624241650e005b7c83","ref":"","in":"body","required":true,"desc":"Title of the Event","default":"","type":"string","name":"title"},{"_id":"56e1bdfa4241650e005b7c85","ref":"","in":"body","required":true,"desc":"Start of Event","default":"","type":"datetime","name":"start_date_time"},{"_id":"56e1be24150ed52d0062c678","ref":"","in":"body","required":false,"desc":"End of Event","default":"start_date_time","type":"datetime","name":"end_date_time"},{"_id":"56e1bdfa4241650e005b7c84","ref":"","in":"body","required":true,"desc":"Array of PageNode IDs to be attached to","default":"","type":"array_int","name":"page_node_ids"},{"_id":"56e1be5bd2f9771900df1cec","ref":"","in":"body","required":false,"desc":"","default":"","type":"string","name":"description"},{"_id":"56e1be5bd2f9771900df1ceb","ref":"","in":"body","required":false,"desc":"Location of Event","default":"","type":"string","name":"location"},{"_id":"56e1be5bd2f9771900df1cea","ref":"","in":"body","required":false,"desc":"URL of Location","default":"","type":"string","name":"location_url"},{"_id":"56e1c12b4241650e005b7c9a","ref":"","in":"body","required":false,"desc":"Protocol of location_url. Possible values are http://, https://, or mailto://.","default":"","type":"string","name":"protocol"},{"_id":"56e1bee336b3bb3400cd0aeb","ref":"","in":"body","required":false,"desc":"","default":"","type":"boolean","name":"all_day_event"},{"_id":"57ea7f161780cd170064f275","ref":"","in":"body","required":false,"desc":"game, practice, etc","default":"","type":"string","name":"event_type"},{"_id":"56e1c0d636b3bb3400cd0af7","ref":"","in":"body","required":false,"desc":"Interval for repeating. Possible values are none, day, week, month, or year.","default":"none","type":"string","name":"recur_interval"},{"_id":"56e1c0d636b3bb3400cd0af6","ref":"","in":"body","required":false,"desc":"","default":"","type":"string","name":"recur_interval_value"},{"_id":"56e1c0d636b3bb3400cd0af5","ref":"","in":"body","required":false,"desc":"Repeats on Sunday","default":"false","type":"boolean","name":"recur_week_sunday"},{"_id":"56e30f646e602e0e00700b27","ref":"","in":"body","required":false,"desc":"Repeats on Monday","default":"false","type":"boolean","name":"recur_week_monday"},{"_id":"56e30f646e602e0e00700b26","ref":"","in":"body","required":false,"desc":"Repeats on Tuesday","default":"false","type":"boolean","name":"recur_week_tuesday"},{"_id":"56e30f646e602e0e00700b25","ref":"","in":"body","required":false,"desc":"Repeats on Wednesday","default":"false","type":"boolean","name":"recur_week_wednesday"},{"_id":"56e30f646e602e0e00700b24","ref":"","in":"body","required":false,"desc":"Repeats on Thursday","default":"false","type":"boolean","name":"recur_week_thursday"},{"_id":"56e30f646e602e0e00700b23","ref":"","in":"body","required":false,"desc":"Repeats on Friday","default":"false","type":"boolean","name":"recur_week_friday"},{"_id":"56e30f646e602e0e00700b22","ref":"","in":"body","required":false,"desc":"Repeats on Saturday","default":"false","type":"boolean","name":"recur_week_saturday"},{"_id":"56e1c0d636b3bb3400cd0af4","ref":"","in":"body","required":false,"desc":"Used if recur_interval is month. Possible values are day_of_month or day_of_week.","default":"","type":"string","name":"recur_month_repeat_by"},{"_id":"56e1c0d636b3bb3400cd0af3","ref":"","in":"body","required":false,"desc":"Date when to stop repeating","default":"","type":"string","name":"recur_end_date"}],"results":{"codes":[{"name":"","code":"{\n \"id\": 306927600,\n \"title\": \"Boston Bears Event\",\n \"description\": null,\n \"location\": \"\",\n \"location_url\": \"\",\n \"start_date_time\": \"2016-04-07T10:00:00-05:00\",\n \"end_date_time\": \"2016-04-07T10:00:00-05:00\",\n \"updated_on\": \"2016-04-06T11:54:38-07:00\",\n \"created_on\": \"2016-04-06T11:54:38-07:00\",\n \"imported_event_flag\": false,\n \"all_day_event\": false,\n \"event_type\": null,\n \"recur_interval\": \"none\",\n \"recur_interval_value\": null,\n \"recur_week_sunday\": false,\n \"recur_week_monday\": false,\n \"recur_week_tuesday\": false,\n \"recur_week_wednesday\": false,\n \"recur_week_thursday\": false,\n \"recur_week_friday\": false,\n \"recur_week_saturday\": false,\n \"recur_month_repeat_by\": null,\n \"recur_end_date\": null,\n \"action\": \"_self\",\n \"protocol\": \"\",\n \"background_schedule_import_id\": null,\n \"event_import_id\": null,\n \"content_node_id\": null,\n \"ical_feed_id\": null,\n \"ical_uid\": null,\n \"layout_template\": \"two_panel\",\n \"utc_start_date_time\": \"2016-04-07T15:00:00-07:00\",\n \"utc_end_date_time\": \"2016-04-07T15:00:00-07:00\",\n \"local_timezone\": \"US/Central\",\n \"game\": null,\n \"has_game\": false,\n \"game_id\": null,\n \"comment_element_id\": 288944370,\n \"recurring_event_originator_id\": null,\n \"full_location_url\": \"\"\n}","language":"json","status":200}]},"settings":"","url":"/events","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X POST -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Content-Type: application/json\" -H \"NGIN-API-VERSION: 0.1\" -d '{\n \"event\": {\n \"title\": \"Boston Bears Event\",\n \"page_node_ids\": 2458139,\n \"start_date_time\": \"2016-04-07T10:00:00-5:00\"\n }\n}' \"https://api.sportngin.com/events\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/events\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n \\\"event\\\": {\\n \\\"title\\\": \\\"Boston Bears Event\\\",\\n \\\"page_node_ids\\\": 2458139,\\n \\\"start_date_time\\\": \\\"2016-04-07T10:00:00-5:00\\\"\\n }\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n \\\"event\\\": {\\n \\\"title\\\": \\\"Boston Bears Event\\\",\\n \\\"page_node_ids\\\": 2458139,\\n \\\"start_date_time\\\": \\\"2016-04-07T10:00:00-5:00\\\"\\n }\\n}\");\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/events\")\n .post(body)\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .addHeader(\"content-type\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]}},"body":"","createdAt":"2016-03-10T18:17:09.211Z","editedParams":true,"project":"5641217e0ee5370d00da636d","updates":[],"category":"56cca51eca43550b00281403","githubsync":"","link_external":false,"parentDoc":null,"title":"Events Create","editedParams2":true,"hidden":false,"type":"post","user":"569e96c56b4a2c0d007e9153","next":{"description":"","pages":[]},"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postEvents Create
Body Params
Definition
Examples
curl -X POST -H "Authorization: Bearer ACCESS_TOKEN" -H "Content-Type: application/json" -H "NGIN-API-VERSION: 0.1" -d '{
"event": {
"title": "Boston Bears Event",
"page_node_ids": 2458139,
"start_date_time": "2016-04-07T10:00:00-5:00"
}
}' "https://api.sportngin.com/events"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["ngin-api-version"] = '0.1'
request["content-type"] = 'application/json'
request.body = "{\n \"event\": {\n \"title\": \"Boston Bears Event\",\n \"page_node_ids\": 2458139,\n \"start_date_time\": \"2016-04-07T10:00:00-5:00\"\n }\n}"
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"event\": {\n \"title\": \"Boston Bears Event\",\n \"page_node_ids\": 2458139,\n \"start_date_time\": \"2016-04-07T10:00:00-5:00\"\n }\n}");
Request request = new Request.Builder()
.url("https://api.sportngin.com/events")
.post(body)
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("ngin-api-version", "0.1")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
Result Format
{
"id": 306927600,
"title": "Boston Bears Event",
"description": null,
"location": "",
"location_url": "",
"start_date_time": "2016-04-07T10:00:00-05:00",
"end_date_time": "2016-04-07T10:00:00-05:00",
"updated_on": "2016-04-06T11:54:38-07:00",
"created_on": "2016-04-06T11:54:38-07:00",
"imported_event_flag": false,
"all_day_event": false,
"event_type": null,
"recur_interval": "none",
"recur_interval_value": null,
"recur_week_sunday": false,
"recur_week_monday": false,
"recur_week_tuesday": false,
"recur_week_wednesday": false,
"recur_week_thursday": false,
"recur_week_friday": false,
"recur_week_saturday": false,
"recur_month_repeat_by": null,
"recur_end_date": null,
"action": "_self",
"protocol": "",
"background_schedule_import_id": null,
"event_import_id": null,
"content_node_id": null,
"ical_feed_id": null,
"ical_uid": null,
"layout_template": "two_panel",
"utc_start_date_time": "2016-04-07T15:00:00-07:00",
"utc_end_date_time": "2016-04-07T15:00:00-07:00",
"local_timezone": "US/Central",
"game": null,
"has_game": false,
"game_id": null,
"comment_element_id": 288944370,
"recurring_event_originator_id": null,
"full_location_url": ""
}
{"_id":"56fabfac52807c2000b777ea","updates":[],"version":"56cca51eca43550b002813fa","link_url":"","project":"5641217e0ee5370d00da636d","sync_unique":"","type":"put","api":{"url":"/events/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X PUT -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n \"event\": {\n \"title\": \"Boston Bears Updated Event\",\n \"start_date_time\": \"2016-04-07T10:00:00-5:00\"\n }\n}' \"https://api.sportngin.com/events/306304983\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/events/306304983\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n \\\"event\\\": {\\n \\\"title\\\": \\\"Boston Bears Updated Event\\\",\\n \\\"start_date_time\\\": \\\"2016-04-07T10:00:00-5:00\\\"\\n }\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n \\\"event\\\": {\\n \\\"title\\\": \\\"Boston Bears Updated Event\\\",\\n \\\"start_date_time\\\": \\\"2016-04-07T10:00:00-5:00\\\"\\n }\\n}\");\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/events/306304983\")\n .put(body)\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .addHeader(\"content-type\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"put","params":[{"type":"string","in":"body","_id":"56e1bd624241650e005b7c83","default":"","desc":"Title of the Event","name":"title","ref":"","required":false},{"name":"start_date_time","ref":"","required":true,"type":"datetime","in":"body","_id":"56e1bdfa4241650e005b7c85","default":"","desc":"Start of Event"},{"name":"end_date_time","in":"body","_id":"56e1be24150ed52d0062c678","ref":"","required":false,"desc":"End of Event","default":"start_date_time","type":"datetime"},{"ref":"","required":false,"type":"array_int","in":"body","_id":"56e1bdfa4241650e005b7c84","default":"","desc":"Array of PageNode IDs to be attached to","name":"page_node_ids"},{"_id":"56e1be5bd2f9771900df1cec","ref":"","required":false,"desc":"","default":"","type":"string","name":"description","in":"body"},{"_id":"56e1be5bd2f9771900df1ceb","ref":"","required":false,"desc":"Location of Event","default":"","type":"string","name":"location","in":"body"},{"_id":"56e1be5bd2f9771900df1cea","ref":"","required":false,"desc":"Url of Location","default":"","type":"string","name":"location_url","in":"body"},{"in":"body","_id":"56e1c12b4241650e005b7c9a","ref":"","required":false,"desc":"Protocol of location_url. Possible values are http://, https://, or mailto://.","default":"","type":"string","name":"protocol"},{"name":"all_day_event","in":"body","_id":"56e1bee336b3bb3400cd0aeb","ref":"","required":false,"desc":"","default":"","type":"boolean"},{"default":"none","type":"string","name":"recur_interval","in":"body","_id":"56e1c0d636b3bb3400cd0af7","ref":"","required":false,"desc":"Interval for repeating. Possible values are none, day, week, month, or year."},{"in":"body","_id":"56e1c0d636b3bb3400cd0af6","ref":"","required":false,"desc":"","default":"","type":"string","name":"recur_interval_value"},{"ref":"","required":false,"desc":"Repeat on Sunday","default":"false","type":"boolean","name":"recur_week_sunday","in":"body","_id":"56e1c0d636b3bb3400cd0af5"},{"required":false,"desc":"Repeat on Monday","default":"false","type":"boolean","name":"recur_week_monday","in":"body","_id":"56e30f646e602e0e00700b27","ref":""},{"default":"false","type":"boolean","name":"recur_week_tuesday","in":"body","_id":"56e30f646e602e0e00700b26","ref":"","required":false,"desc":"Repeat on Tuesday"},{"in":"body","_id":"56e30f646e602e0e00700b25","ref":"","required":false,"desc":"Repeat on Wednesday","default":"false","type":"boolean","name":"recur_week_wednesday"},{"ref":"","required":false,"desc":"Repeat on Thursday","default":"false","type":"boolean","name":"recur_week_thursday","in":"body","_id":"56e30f646e602e0e00700b24"},{"type":"boolean","name":"recur_week_friday","in":"body","_id":"56e30f646e602e0e00700b23","ref":"","required":false,"desc":"Repeat on Friday","default":"false"},{"required":false,"desc":"Repeat on Saturday","default":"false","type":"boolean","name":"recur_week_saturday","in":"body","_id":"56e30f646e602e0e00700b22","ref":""},{"desc":"Used if recur_interval is month. Possible values are day_of_month or day_of_week.","default":"","type":"string","name":"recur_month_repeat_by","in":"body","_id":"56e1c0d636b3bb3400cd0af4","ref":"","required":false},{"ref":"","required":false,"desc":"Date when to stop repeating","default":"","type":"string","name":"recur_end_date","in":"body","_id":"56e1c0d636b3bb3400cd0af3"}],"results":{"codes":[{"name":"","code":"{\n \"id\": 306304983,\n \"title\": \"Boston Bears Updated Event\",\n \"description\": null,\n \"location\": \"\",\n \"location_url\": \"\",\n \"start_date_time\": \"2016-04-07T10:00:00-05:00\",\n \"end_date_time\": \"2016-04-07T10:00:00-05:00\",\n \"updated_on\": \"2016-04-07T09:44:37-07:00\",\n \"created_on\": \"2016-04-07T09:43:19-07:00\",\n \"imported_event_flag\": false,\n \"all_day_event\": false,\n \"event_type\": null,\n \"recur_interval\": \"none\",\n \"recur_interval_value\": null,\n \"recur_week_sunday\": false,\n \"recur_week_monday\": false,\n \"recur_week_tuesday\": false,\n \"recur_week_wednesday\": false,\n \"recur_week_thursday\": false,\n \"recur_week_friday\": false,\n \"recur_week_saturday\": false,\n \"recur_month_repeat_by\": null,\n \"recur_end_date\": null,\n \"action\": \"_self\",\n \"protocol\": \"\",\n \"background_schedule_import_id\": null,\n \"event_import_id\": null,\n \"content_node_id\": null,\n \"ical_feed_id\": null,\n \"ical_uid\": null,\n \"layout_template\": \"two_panel\",\n \"utc_start_date_time\": \"2016-04-07T15:00:00-07:00\",\n \"utc_end_date_time\": \"2016-04-07T15:00:00-07:00\",\n \"local_timezone\": \"US/Central\",\n \"game\": null,\n \"has_game\": false,\n \"game_id\": null,\n \"comment_element_id\": 288311109,\n \"recurring_event_originator_id\": null,\n \"full_location_url\": \"\"\n}","language":"json","status":200}]},"settings":""},"category":"56cca51eca43550b00281403","link_external":false,"title":"Events Update","user":"569e96c56b4a2c0d007e9153","__v":0,"body":"","createdAt":"2016-03-29T17:47:24.032Z","hidden":false,"slug":"events-update","order":4,"parentDoc":null,"editedParams":true,"editedParams2":true,"excerpt":"The Update method accepts a single Event (see attributes above) and updates the matching record in SportsEngine.\n\n###Parameters","githubsync":"","isReference":true,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putEvents Update
Body Params
Definition
Examples
curl -X PUT -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -H "Content-Type: application/json" -d '{
"event": {
"title": "Boston Bears Updated Event",
"start_date_time": "2016-04-07T10:00:00-5:00"
}
}' "https://api.sportngin.com/events/306304983"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/events/306304983")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Put.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
request["content-type"] = 'application/json'
request.body = "{\n \"event\": {\n \"title\": \"Boston Bears Updated Event\",\n \"start_date_time\": \"2016-04-07T10:00:00-5:00\"\n }\n}"
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"event\": {\n \"title\": \"Boston Bears Updated Event\",\n \"start_date_time\": \"2016-04-07T10:00:00-5:00\"\n }\n}");
Request request = new Request.Builder()
.url("https://api.sportngin.com/events/306304983")
.put(body)
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
Result Format
{
"id": 306304983,
"title": "Boston Bears Updated Event",
"description": null,
"location": "",
"location_url": "",
"start_date_time": "2016-04-07T10:00:00-05:00",
"end_date_time": "2016-04-07T10:00:00-05:00",
"updated_on": "2016-04-07T09:44:37-07:00",
"created_on": "2016-04-07T09:43:19-07:00",
"imported_event_flag": false,
"all_day_event": false,
"event_type": null,
"recur_interval": "none",
"recur_interval_value": null,
"recur_week_sunday": false,
"recur_week_monday": false,
"recur_week_tuesday": false,
"recur_week_wednesday": false,
"recur_week_thursday": false,
"recur_week_friday": false,
"recur_week_saturday": false,
"recur_month_repeat_by": null,
"recur_end_date": null,
"action": "_self",
"protocol": "",
"background_schedule_import_id": null,
"event_import_id": null,
"content_node_id": null,
"ical_feed_id": null,
"ical_uid": null,
"layout_template": "two_panel",
"utc_start_date_time": "2016-04-07T15:00:00-07:00",
"utc_end_date_time": "2016-04-07T15:00:00-07:00",
"local_timezone": "US/Central",
"game": null,
"has_game": false,
"game_id": null,
"comment_element_id": 288311109,
"recurring_event_originator_id": null,
"full_location_url": ""
}
{"_id":"56fac0f31770652b003633f4","hidden":false,"link_external":false,"link_url":"","version":"56cca51eca43550b002813fa","githubsync":"","createdAt":"2016-03-29T17:52:51.792Z","editedParams":true,"excerpt":"The Delete method permanently deletes the associated Event record in SportsEngine. *This method takes action upon initial invocation and cannot be reversed.*\n\n###Parameters","title":"Events Delete","type":"delete","user":"569e96c56b4a2c0d007e9153","category":"56cca51eca43550b00281403","isReference":true,"project":"5641217e0ee5370d00da636d","slug":"events-delete","sync_unique":"","api":{"examples":{"codes":[{"language":"curl","code":"curl -X DELETE -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" \"https://api.sportngin.com/events/306927600\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/events/306927600\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/events/306927600\")\n .delete(null)\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"ngin-api-version\", \"0.1\")\n .addHeader(\"content-type\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"delete","params":[{"in":"path","_id":"56fac1316c4e0e1900b1d80f","ref":"","required":true,"desc":"Id of Event","default":"","type":"int","name":"id"}],"results":{"codes":[{"language":"json","status":200,"code":"{\n \"id\": 306927600,\n \"title\": \"Boston Bears Event\",\n \"description\": null,\n \"location\": \"\",\n \"location_url\": \"\",\n \"start_date_time\": \"2016-04-07T10:00:00-05:00\",\n \"end_date_time\": \"2016-04-07T10:00:00-05:00\",\n \"updated_on\": \"2016-04-06T11:54:38-07:00\",\n \"created_on\": \"2016-04-06T11:54:38-07:00\",\n \"imported_event_flag\": false,\n \"all_day_event\": false,\n \"event_type\": null,\n \"recur_interval\": \"none\",\n \"recur_interval_value\": null,\n \"recur_week_sunday\": false,\n \"recur_week_monday\": false,\n \"recur_week_tuesday\": false,\n \"recur_week_wednesday\": false,\n \"recur_week_thursday\": false,\n \"recur_week_friday\": false,\n \"recur_week_saturday\": false,\n \"recur_month_repeat_by\": null,\n \"recur_end_date\": null,\n \"action\": \"_self\",\n \"protocol\": \"\",\n \"background_schedule_import_id\": null,\n \"event_import_id\": null,\n \"content_node_id\": null,\n \"ical_feed_id\": null,\n \"ical_uid\": null,\n \"layout_template\": \"two_panel\",\n \"utc_start_date_time\": \"2016-04-07T15:00:00-07:00\",\n \"utc_end_date_time\": \"2016-04-07T15:00:00-07:00\",\n \"local_timezone\": \"US/Central\",\n \"game\": null,\n \"has_game\": false,\n \"game_id\": null,\n \"comment_element_id\": 288944370,\n \"recurring_event_originator_id\": null,\n \"full_location_url\": \"\"\n}"}]},"settings":"","url":"/events/:id","auth":"required"},"body":"","editedParams2":true,"order":5,"parentDoc":null,"updates":[],"__v":3,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteEvents Delete
Path Params
Definition
Examples
curl -X DELETE -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -H "Content-Type: application/json" "https://api.sportngin.com/events/306927600"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/events/306927600")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Delete.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
request["content-type"] = 'application/json'
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.sportngin.com/events/306927600")
.delete(null)
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.addHeader("ngin-api-version", "0.1")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
Result Format
{
"id": 306927600,
"title": "Boston Bears Event",
"description": null,
"location": "",
"location_url": "",
"start_date_time": "2016-04-07T10:00:00-05:00",
"end_date_time": "2016-04-07T10:00:00-05:00",
"updated_on": "2016-04-06T11:54:38-07:00",
"created_on": "2016-04-06T11:54:38-07:00",
"imported_event_flag": false,
"all_day_event": false,
"event_type": null,
"recur_interval": "none",
"recur_interval_value": null,
"recur_week_sunday": false,
"recur_week_monday": false,
"recur_week_tuesday": false,
"recur_week_wednesday": false,
"recur_week_thursday": false,
"recur_week_friday": false,
"recur_week_saturday": false,
"recur_month_repeat_by": null,
"recur_end_date": null,
"action": "_self",
"protocol": "",
"background_schedule_import_id": null,
"event_import_id": null,
"content_node_id": null,
"ical_feed_id": null,
"ical_uid": null,
"layout_template": "two_panel",
"utc_start_date_time": "2016-04-07T15:00:00-07:00",
"utc_end_date_time": "2016-04-07T15:00:00-07:00",
"local_timezone": "US/Central",
"game": null,
"has_game": false,
"game_id": null,
"comment_element_id": 288944370,
"recurring_event_originator_id": null,
"full_location_url": ""
}
{"_id":"56f18cc09791b22d0077b9ea","link_url":"","parentDoc":null,"sync_unique":"","type":"get","updates":[],"user":"56e71f9edee212320019e731","category":"56cca51eca43550b00281403","editedParams":true,"version":"56cca51eca43550b002813fa","excerpt":"The Index method returns an array of Games matching the given parameters. This endpoint requires `page`, and either `subseason_id`, `division_instance_id`, or `team_instance_id`.\n\nOptional parameters include: `before` (inclusive, formatted mm-dd-yyyy), `after` (inclusive, formattted mm-dd-yyyy), `today`, and `filters`.\n\n###Parameters","isReference":true,"order":6,"project":"5641217e0ee5370d00da636d","title":"Games Index","__v":2,"createdAt":"2016-03-22T18:19:44.358Z","editedParams2":true,"slug":"games-index","api":{"results":{"codes":[{"language":"json","code":"[\n {\n \"id\": 13557129,\n \"team_1_id\": 1876243,\n \"team_1_is_home\": true,\n \"team_2_id\": 1876249,\n \"team_2_name\": null,\n \"subseason_id\": 291621,\n \"event_id\": 307388787,\n \"status\": \"scheduled\",\n \"affects_standings\": 1,\n \"referee_signoff\": null,\n \"notes\": null,\n \"submitted_on\": null,\n \"created_at\": \"2016-04-07T11:11:20-07:00\",\n \"updated_at\": \"2016-04-07T11:11:27-07:00\",\n \"properties\": {\n \"added_periods\": null,\n \"my_num_non_overtime_periods\": null,\n \"my_num_periods\": null,\n \"overtime_intervals\": 2,\n \"overtime_length\": \"5\",\n \"quick_score_overtime\": false,\n \"quick_score_shootout\": false,\n \"regulation_time_intervals\": [\n \"20\",\n \"20\",\n \"20\"\n ],\n \"shootout_enabled\": false,\n \"time_interval_name\": \"period\",\n \"time_intervals\": [\n \"20\",\n \"20\",\n \"20\"\n ]\n },\n \"enable_live_webcast\": true,\n \"original_scorer_id\": null,\n \"last_editor_id\": null,\n \"image_id\": null,\n \"sport_id\": 1,\n \"game_id\": null,\n \"embed_code\": null,\n \"quick_score_id\": null,\n \"extra_game_details_id\": 11352836,\n \"scoring_type\": \"unscored\",\n \"live_scoring_locked\": null,\n \"division_override\": null,\n \"field_of_play_enabled\": false,\n \"game_stats_updated_at\": null,\n \"team_1_division_id\": null,\n \"team_2_division_id\": null,\n \"home_team_id\": 1876243,\n \"away_team_id\": 1876249,\n \"home_team_name\": \"Boston Bears\",\n \"home_team_abbrev\": \"Bos\",\n \"home_team_button_title\": \"Boston\",\n \"away_team_name\": \"Detroit Cyclists\",\n \"away_team_abbrev\": \"Det\",\n \"away_team_button_title\": \"Detroit\",\n \"home_team_logo\": null,\n \"away_team_logo\": null,\n \"home_team_logo_large_square\": null,\n \"away_team_logo_large_square\": null,\n \"current_period\": 0,\n \"time_remaining\": null,\n \"score_by_time_interval\": [\n \"scheduled\"\n ],\n \"home_team_score_api\": 0,\n \"away_team_score_api\": 0,\n \"comment_element_id\": 289413351,\n \"total_interval_count\": 0,\n \"game_show_url\": \"http://apidemo.sportngin.com/game/show/13557129?subseason=291621\",\n \"start_date_time\": \"2016-04-28T13:15:00-05:00\",\n \"end_date_time\": \"2016-04-28T13:15:00-05:00\",\n \"location\": \"Joe Louis Arena\",\n \"overtime_game\": false,\n \"half_point_scorable\": false,\n \"local_timezone\": \"US/Central\"\n },\n {\n \"id\": 13557134,\n \"team_1_id\": 1876243,\n \"team_1_is_home\": true,\n \"team_2_id\": 1876249,\n \"team_2_name\": null,\n \"subseason_id\": 291621,\n \"event_id\": 307389556,\n \"status\": \"scheduled\",\n \"affects_standings\": 1,\n \"referee_signoff\": null,\n \"notes\": null,\n \"submitted_on\": null,\n \"created_at\": \"2016-04-07T11:12:41-07:00\",\n \"updated_at\": \"2016-04-07T11:17:20-07:00\",\n \"properties\": {\n \"added_periods\": null,\n \"my_num_non_overtime_periods\": null,\n \"my_num_periods\": null,\n \"overtime_intervals\": 2,\n \"overtime_length\": \"5\",\n \"quick_score_overtime\": false,\n \"quick_score_shootout\": false,\n \"regulation_time_intervals\": [\n \"20\",\n \"20\",\n \"20\"\n ],\n \"shootout_enabled\": false,\n \"time_interval_name\": \"period\",\n \"time_intervals\": [\n \"20\",\n \"20\",\n \"20\"\n ]\n },\n \"enable_live_webcast\": true,\n \"original_scorer_id\": null,\n \"last_editor_id\": null,\n \"image_id\": null,\n \"sport_id\": 1,\n \"game_id\": null,\n \"embed_code\": null,\n \"quick_score_id\": null,\n \"extra_game_details_id\": 11352841,\n \"scoring_type\": \"unscored\",\n \"live_scoring_locked\": null,\n \"division_override\": null,\n \"field_of_play_enabled\": false,\n \"game_stats_updated_at\": null,\n \"team_1_division_id\": null,\n \"team_2_division_id\": null,\n \"home_team_id\": 1876243,\n \"away_team_id\": 1876249,\n \"home_team_name\": \"Boston Bears\",\n \"home_team_abbrev\": \"Bos\",\n \"home_team_button_title\": \"Boston\",\n \"away_team_name\": \"Detroit Cyclists\",\n \"away_team_abbrev\": \"Det\",\n \"away_team_button_title\": \"Detroit\",\n \"home_team_logo\": null,\n \"away_team_logo\": null,\n \"home_team_logo_large_square\": null,\n \"away_team_logo_large_square\": null,\n \"current_period\": 0,\n \"time_remaining\": null,\n \"score_by_time_interval\": [\n \"scheduled\"\n ],\n \"home_team_score_api\": 0,\n \"away_team_score_api\": 0,\n \"comment_element_id\": 289414128,\n \"total_interval_count\": 0,\n \"game_show_url\": \"http://apidemo.sportngin.com/game/show/13557134?subseason=291621\",\n \"start_date_time\": \"2016-04-28T14:15:00-05:00\",\n \"end_date_time\": \"2016-04-28T14:15:00-05:00\",\n \"location\": \"TD Garden\",\n \"overtime_game\": false,\n \"half_point_scorable\": false,\n \"local_timezone\": \"US/Central\"\n }\n]","name":"","status":200}]},"settings":"","url":"/games","auth":"required","examples":{"codes":[{"name":"cURL","code":"curl -X GET -H \"NGIN-API-VERSION: 0.1\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" \"https://api.sportngin.com/games?subseason_id=291621&page=1\"","language":"curl"},{"name":null,"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/games?subseason_id=291621&page=1\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/games?subseason_id=291621&page=1\")\n .get()\n .addHeader(\"ngin-api-version\", \"0.1\")\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();"},{"name":"cURL - with filters","language":"curl","code":"curl -X GET -H \"NGIN-API-VERSION: 0.1\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" \"https://api.sportngin.com/games?subseason_id=291621&page=1&filters[rules][][field]=updated_at&filters[rules][][operator]=gt&filters[rules][][value]=2015-12-04%2006:53:05\""},{"name":"Ruby - with filters","language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/games?subseason_id=291621&page=1&filters%5Brules%5D%5B%5D%5Bfield%5D=updated_at&filters%5Brules%5D%5B%5D%5Boperator%5D=gt&filters%5Brules%5D%5B%5D%5Bvalue%5D=2015-12-04%252006%3A53%3A05\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\n\nresponse = http.request(request)\nputs response.read_body"},{"name":"Java - with filters","language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/games?subseason_id=291621&page=1&filters%5Brules%5D%5B%5D%5Bfield%5D=updated_at&filters%5Brules%5D%5B%5D%5Boperator%5D=gt&filters%5Brules%5D%5B%5D%5Bvalue%5D=2015-12-04%252006%3A53%3A05\")\n .get()\n .addHeader(\"ngin-api-version\", \"0.1\")\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"in":"query","_id":"56f18cc09791b22d0077b9ee","ref":"","required":true,"desc":"Page of results to display","default":"","type":"int","name":"page"},{"name":"subseason_id","in":"query","_id":"56f18cc09791b22d0077b9ed","ref":"","required":false,"desc":"","default":"","type":"int"},{"default":"","type":"int","name":"divison_instance_id","in":"query","_id":"56f18cc09791b22d0077b9ec","ref":"","required":false,"desc":""},{"in":"query","_id":"56f18cc09791b22d0077b9eb","ref":"","required":false,"desc":"","default":"","type":"int","name":"team_instance_id"},{"name":"per_page","in":"query","_id":"56f2f32aa0de870e003b6d73","ref":"","required":false,"desc":"Number of results to display per page","default":"100","type":"int"},{"default":"","type":"string","name":"ext_game_id","in":"query","_id":"56f2f3a6c6d9e30e00590507","ref":"","required":false,"desc":""},{"in":"query","_id":"56f2f3a6c6d9e30e00590506","ref":"","required":false,"desc":"","default":"","type":"int","name":"game_ids"},{"name":"season_id","in":"query","_id":"56f2f3a6c6d9e30e00590505","ref":"","required":false,"desc":"","default":"","type":"int"}]},"body":"","hidden":false,"link_external":false,"githubsync":"","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getGames Index
Query Params
Definition
Examples
curl -X GET -H "NGIN-API-VERSION: 0.1" -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" "https://api.sportngin.com/games?subseason_id=291621&page=1"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/games?subseason_id=291621&page=1")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["ngin-api-version"] = '0.1'
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.sportngin.com/games?subseason_id=291621&page=1")
.get()
.addHeader("ngin-api-version", "0.1")
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.build();
Response response = client.newCall(request).execute();
curl -X GET -H "NGIN-API-VERSION: 0.1" -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" "https://api.sportngin.com/games?subseason_id=291621&page=1&filters[rules][][field]=updated_at&filters[rules][][operator]=gt&filters[rules][][value]=2015-12-04%2006:53:05"
require 'uri'
require 'net/http'
url = URI("https://api.sportngin.com/games?subseason_id=291621&page=1&filters%5Brules%5D%5B%5D%5Bfield%5D=updated_at&filters%5Brules%5D%5B%5D%5Boperator%5D=gt&filters%5Brules%5D%5B%5D%5Bvalue%5D=2015-12-04%252006%3A53%3A05")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["ngin-api-version"] = '0.1'
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.sportngin.com/games?subseason_id=291621&page=1&filters%5Brules%5D%5B%5D%5Bfield%5D=updated_at&filters%5Brules%5D%5B%5D%5Boperator%5D=gt&filters%5Brules%5D%5B%5D%5Bvalue%5D=2015-12-04%252006%3A53%3A05")
.get()
.addHeader("ngin-api-version", "0.1")
.addHeader("authorization", "Bearer ACCESS_TOKEN")
.addHeader("accept", "application/json")
.build();
Response response = client.newCall(request).execute();
Result Format
[
{
"id": 13557129,
"team_1_id": 1876243,
"team_1_is_home": true,
"team_2_id": 1876249,
"team_2_name": null,
"subseason_id": 291621,
"event_id": 307388787,
"status": "scheduled",
"affects_standings": 1,
"referee_signoff": null,
"notes": null,
"submitted_on": null,
"created_at": "2016-04-07T11:11:20-07:00",
"updated_at": "2016-04-07T11:11:27-07:00",
"properties": {
"added_periods": null,
"my_num_non_overtime_periods": null,
"my_num_periods": null,
"overtime_intervals": 2,
"overtime_length": "5",
"quick_score_overtime": false,
"quick_score_shootout": false,
"regulation_time_intervals": [
"20",
"20",
"20"
],
"shootout_enabled": false,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
]
},
"enable_live_webcast": true,
"original_scorer_id": null,
"last_editor_id": null,
"image_id": null,
"sport_id": 1,
"game_id": null,
"embed_code": null,
"quick_score_id": null,
"extra_game_details_id": 11352836,
"scoring_type": "unscored",
"live_scoring_locked": null,
"division_override": null,
"field_of_play_enabled": false,
"game_stats_updated_at": null,
"team_1_division_id": null,
"team_2_division_id": null,
"home_team_id": 1876243,
"away_team_id": 1876249,
"home_team_name": "Boston Bears",
"home_team_abbrev": "Bos",
"home_team_button_title": "Boston",
"away_team_name": "Detroit Cyclists",
"away_team_abbrev": "Det",
"away_team_button_title": "Detroit",
"home_team_logo": null,
"away_team_logo": null,
"home_team_logo_large_square": null,
"away_team_logo_large_square": null,
"current_period": 0,
"time_remaining": null,
"score_by_time_interval": [
"scheduled"
],
"home_team_score_api": 0,
"away_team_score_api": 0,
"comment_element_id": 289413351,
"total_interval_count": 0,
"game_show_url": "http://apidemo.sportngin.com/game/show/13557129?subseason=291621",
"start_date_time": "2016-04-28T13:15:00-05:00",
"end_date_time": "2016-04-28T13:15:00-05:00",
"location": "Joe Louis Arena",
"overtime_game": false,
"half_point_scorable": false,
"local_timezone": "US/Central"
},
{
"id": 13557134,
"team_1_id": 1876243,
"team_1_is_home": true,
"team_2_id": 1876249,
"team_2_name": null,
"subseason_id": 291621,
"event_id": 307389556,
"status": "scheduled",
"affects_standings": 1,
"referee_signoff": null,
"notes": null,
"submitted_on": null,
"created_at": "2016-04-07T11:12:41-07:00",
"updated_at": "2016-04-07T11:17:20-07:00",
"properties": {
"added_periods": null,
"my_num_non_overtime_periods": null,
"my_num_periods": null,
"overtime_intervals": 2,
"overtime_length": "5",
"quick_score_overtime": false,
"quick_score_shootout": false,
"regulation_time_intervals": [
"20",
"20",
"20"
],
"shootout_enabled": false,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
]
},
"enable_live_webcast": true,
"original_scorer_id": null,
"last_editor_id": null,
"image_id": null,
"sport_id": 1,
"game_id": null,
"embed_code": null,
"quick_score_id": null,
"extra_game_details_id": 11352841,
"scoring_type": "unscored",
"live_scoring_locked": null,
"division_override": null,
"field_of_play_enabled": false,
"game_stats_updated_at": null,
"team_1_division_id": null,
"team_2_division_id": null,
"home_team_id": 1876243,
"away_team_id": 1876249,
"home_team_name": "Boston Bears",
"home_team_abbrev": "Bos",
"home_team_button_title": "Boston",
"away_team_name": "Detroit Cyclists",
"away_team_abbrev": "Det",
"away_team_button_title": "Detroit",
"home_team_logo": null,
"away_team_logo": null,
"home_team_logo_large_square": null,
"away_team_logo_large_square": null,
"current_period": 0,
"time_remaining": null,
"score_by_time_interval": [
"scheduled"
],
"home_team_score_api": 0,
"away_team_score_api": 0,
"comment_element_id": 289414128,
"total_interval_count": 0,
"game_show_url": "http://apidemo.sportngin.com/game/show/13557134?subseason=291621",
"start_date_time": "2016-04-28T14:15:00-05:00",
"end_date_time": "2016-04-28T14:15:00-05:00",
"location": "TD Garden",
"overtime_game": false,
"half_point_scorable": false,
"local_timezone": "US/Central"
}
]
{"_id":"56f18a0b4476fb2200795e11","category":"56cca51eca43550b00281403","slug":"games-show","title":"Games Show","type":"get","__v":0,"editedParams2":true,"link_url":"","order":7,"sync_unique":"","body":"###Attributes\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Name\",\n \"h-1\": \"Type\",\n \"h-2\": \"Description\",\n \"0-0\": \"id\",\n \"1-0\": \"sport_id\",\n \"2-0\": \"status\",\n \"3-0\": \"subseason_id\",\n \"4-0\": \"team_1_id\",\n \"5-0\": \"team_2_id\",\n \"6-0\": \"start_date_time\",\n \"7-0\": \"end_date_time\",\n \"8-0\": \"home_team_id\",\n \"9-0\": \"away_team_id\",\n \"10-0\": \"team_1_is_home\",\n \"11-0\": \"location\",\n \"12-0\": \"location_url_protocol\",\n \"13-0\": \"location_url\",\n \"14-0\": \"description\",\n \"16-0\": \"notes\",\n \"18-0\": \"properties\",\n \"22-0\": \"officials\",\n \"23-0\": \"extra_game_details\",\n \"24-0\": \"affects_standings\",\n \"25-0\": \"created_at\",\n \"26-0\": \"updated_at\",\n \"27-0\": \"time_remaining\",\n \"28-0\": \"currernt_period\",\n \"29-0\": \"score_by_time_interval\",\n \"30-0\": \"home_team_name\",\n \"33-0\": \"home_team_logo\",\n \"35-0\": \"home_team_score_api\",\n \"36-0\": \"away_team_name\",\n \"39-0\": \"away_team_logo\",\n \"41-0\": \"away_team_score_api\",\n \"42-0\": \"scoring_type\",\n \"0-1\": \"Integer\",\n \"1-1\": \"Integer\",\n \"2-1\": \"String\",\n \"3-1\": \"Integer\",\n \"4-1\": \"Integer\",\n \"4-2\": \"ID of Team 1 instance: set as home by default\",\n \"5-1\": \"Integer\",\n \"6-1\": \"Datetime\",\n \"7-1\": \"Datetime\",\n \"8-1\": \"Integer\",\n \"9-1\": \"Integer\",\n \"10-1\": \"Boolean\",\n \"11-1\": \"String\",\n \"12-1\": \"String\",\n \"13-1\": \"String\",\n \"14-1\": \"String\",\n \"16-1\": \"String\",\n \"18-1\": \"Object\",\n \"22-1\": \"Array\",\n \"23-1\": \"Object\",\n \"24-1\": \"Boolean\",\n \"25-1\": \"Timestamp\",\n \"26-1\": \"Timestamp\",\n \"27-1\": \"Time\",\n \"28-1\": \"Integer\",\n \"29-1\": \"Array\",\n \"30-1\": \"String\",\n \"33-1\": \"String\",\n \"35-1\": \"Integer\",\n \"36-1\": \"String\",\n \"36-2\": \"Name of the away team\",\n \"39-1\": \"String\",\n \"41-1\": \"Integer\",\n \"42-1\": \"String\",\n \"0-2\": \"Unique ID assigned by NGIN\",\n \"1-2\": \"ID of the game's sport\",\n \"2-2\": \"The status of the game (unscheduled, scheduled, in_progress, unofficial_final, completed, postponed, cancelled, delayed)\",\n \"3-2\": \"ID of subseason assigned by NGIN\",\n \"5-2\": \"ID of Team 2 instance: set as away by default\",\n \"6-2\": \"Timestamp of the start time of the game\",\n \"7-2\": \"Timestamp of the end time of the game: derived from start time if not passed\",\n \"8-2\": \"ID of the home team_instance: can be used in place of team_#_id once game exists\",\n \"9-2\": \"ID of the away team_instance: can be used in place of team_#_id once game exists\",\n \"10-2\": \"Defaults to true: false will set team_2 as home\",\n \"11-2\": \"Description of the location of the game\",\n \"12-2\": \"HTTP protocol of the location_url\",\n \"13-2\": \"URL for the location (excludes http protocol)\",\n \"14-2\": \"Description of the game\",\n \"16-2\": \"Extra notes and information for the game\",\n \"18-2\": \"Additional properties for the game\",\n \"22-2\": \"Officials for the game\",\n \"23-2\": \"Extra information about the game\",\n \"24-2\": \"Whether or not the game affects the teams' standings\",\n \"25-2\": \"Timestamp of creation date\",\n \"26-2\": \"Timestamp of last update\",\n \"27-2\": \"Derived field. Remaining time of a game\",\n \"28-2\": \"Derived field. Current period of a game\",\n \"29-2\": \"Derived field. Scores by game periods\",\n \"30-2\": \"Name of the home team\",\n \"33-2\": \"Image url of the home team\",\n \"35-2\": \"Read only - use the Quick Score API to update final game scores\",\n \"39-2\": \"Image url of the away team\",\n \"41-2\": \"Read only - use the Quick Score API to update final game scores\",\n \"42-2\": \"Possible values are quick, tabular, live, unscored\",\n \"31-0\": \"home_team_abbrev\",\n \"32-0\": \"home_team_button_title\",\n \"34-0\": \"home_team_logo_large_square\",\n \"40-0\": \"away_team_logo_large_square\",\n \"37-0\": \"away_team_abbrev\",\n \"38-0\": \"away_team_button_title\",\n \"31-1\": \"String\",\n \"32-1\": \"String\",\n \"34-1\": \"String\",\n \"37-1\": \"String\",\n \"38-1\": \"String\",\n \"40-1\": \"String\",\n \"31-2\": \"Abbreviation of the home team\",\n \"37-2\": \"Abbreviation of the away team\",\n \"32-2\": \"Button title of the home team\",\n \"38-2\": \"Button title of the away team\",\n \"34-2\": \"URL of large square image of the home team\",\n \"40-2\": \"Url of large square image of the away team\",\n \"54-0\": \"local_timezone\",\n \"54-1\": \"String\",\n \"54-2\": \"Timezone of the Game\",\n \"53-0\": \"half_point_scorable\",\n \"52-0\": \"overtime_game\",\n \"51-0\": \"game_show_url\",\n \"50-0\": \"total_interval_count\",\n \"49-0\": \"comment_element_id\",\n \"47-0\": \"team_1_division_id\",\n \"48-0\": \"team_2_division_id\",\n \"46-0\": \"game_stats_updated_at\",\n \"45-0\": \"field_of_play_enabled\",\n \"44-0\": \"division_override\",\n \"43-0\": \"live_scoring_locked\",\n \"17-0\": \"submitted_on\",\n \"15-0\": \"referee_signoff\",\n \"19-0\": \"image_id\",\n \"20-0\": \"game_id\",\n \"21-0\": \"embed_code\",\n \"44-2\": \"Force division game\",\n \"44-1\": \"Boolean\",\n \"43-1\": \"Boolean\",\n \"45-1\": \"Boolean\",\n \"46-1\": \"Timestamp\",\n \"46-2\": \"Timestamp when the game stats were last updated\",\n \"47-1\": \"Integer\",\n \"48-1\": \"Integer\",\n \"49-1\": \"Integer\",\n \"49-2\": \"Id of CommentElement\",\n \"50-1\": \"Integer\",\n \"51-1\": \"String\",\n \"53-1\": \"Boolean\",\n \"52-1\": \"Boolean\",\n \"52-2\": \"Determines if this game went into overtime\",\n \"51-2\": \"Url to the game page\",\n \"50-2\": \"Number of periods or quarters\",\n \"53-2\": \"Determines if half-points are allowed when scoring\",\n \"47-2\": \"Scope available teams on a TBD game for team_1\",\n \"48-2\": \"Scope available teams on a TBD game for team_2\",\n \"43-2\": \"Can't live score if locked\",\n \"55-0\": \"live_scoring_url\",\n \"55-1\": \"String\",\n \"55-2\": \"Url to live-score the game\",\n \"45-2\": \"Display field on game show page\",\n \"19-2\": \"ID of Image\",\n \"20-2\": \"ID of Game for other team\",\n \"21-2\": \"Custom code that goes on the game show page\",\n \"19-1\": \"Integer\",\n \"20-1\": \"Integer\",\n \"21-1\": \"String\",\n \"17-1\": \"Timestamp\",\n \"17-2\": \"Timestamp when the game is first saved in completed status\",\n \"15-1\": \"String\",\n \"15-2\": \"Text that represents an Official signing off on the game\"\n },\n \"cols\": 3,\n \"rows\": 56\n}\n[/block]\n###Official Attributes\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Name\",\n \"h-1\": \"Type\",\n \"h-2\": \"Description\",\n \"0-0\": \"id\",\n \"1-0\": \"name\",\n \"2-0\": \"official_type_id\",\n \"3-0\": \"created_at\",\n \"4-0\": \"updated_at\",\n \"0-1\": \"Integer\",\n \"1-1\": \"String\",\n \"2-1\": \"Integer\",\n \"3-1\": \"Datetime\",\n \"4-1\": \"Datetime\",\n \"0-2\": \"Unique id assigned by NGIN\",\n \"1-2\": \"Name of the official\",\n \"2-2\": \"id of the type of official\",\n \"3-2\": \"Timestamp of creation date\",\n \"4-2\": \"Timestamp of last update\"\n },\n \"cols\": 3,\n \"rows\": 5\n}\n[/block]\n###Extra Game Details Attributes\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Name\",\n \"h-1\": \"Type\",\n \"h-2\": \"Description\",\n \"0-0\": \"id\",\n \"1-0\": \"ext_game_id\",\n \"2-0\": \"weather_conditions\",\n \"3-0\": \"wind_speed\",\n \"4-0\": \"wind_speed_units\",\n \"5-0\": \"wind_direction\",\n \"6-0\": \"temperature\",\n \"7-0\": \"temperature_units\",\n \"8-0\": \"attendance\",\n \"9-0\": \"sellout\",\n \"10-0\": \"night_game\",\n \"11-0\": \"neutral_field\",\n \"12-0\": \"natural_surface\",\n \"13-0\": \"created_at\",\n \"14-0\": \"updated_at\",\n \"0-1\": \"Integer\",\n \"1-1\": \"String\",\n \"2-1\": \"String\",\n \"3-1\": \"Integer\",\n \"4-1\": \"String\",\n \"5-1\": \"String\",\n \"6-1\": \"Integer\",\n \"7-1\": \"String\",\n \"8-1\": \"Integer\",\n \"9-1\": \"Boolean\",\n \"10-1\": \"Boolean\",\n \"11-1\": \"Boolean\",\n \"12-1\": \"Boolean\",\n \"13-1\": \"Datetime\",\n \"14-1\": \"Datetime\",\n \"0-2\": \"Unique id assigned by NGIN\",\n \"1-2\": \"User specified game id number\",\n \"2-2\": \"Description of the weather conditions for the game\",\n \"3-2\": \"Wind speed for the game\",\n \"4-2\": \"Units the wind speed is measured in\",\n \"5-2\": \"Direction the wind was blowing during the game\",\n \"6-2\": \"Temperature during the game\",\n \"7-2\": \"Units the temperature is measured in\",\n \"8-2\": \"Number of spectators attending the game\",\n \"9-2\": \"Whether or not the game sold out\",\n \"10-2\": \"Whether or not the game was played at night\",\n \"11-2\": \"Whether or not the game was played on a neutral field\",\n \"12-2\": \"Whether or not the game was played on a natural surface\",\n \"13-2\": \"Timestamp of creation date\",\n \"14-2\": \"Timestamp of last update\"\n },\n \"cols\": 3,\n \"rows\": 15\n}\n[/block]","api":{"settings":"","url":"/games/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"NGIN-API-VERSION: 0.1\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" \"https://api.sportngin.com/games/13557134\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/games/13557134\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.sportngin.com/games/13557134\")\n .get()\n .addHeader(\"ngin-api-version\", \"0.1\")\n .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n .addHeader(\"accept\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"ref":"","required":true,"type":"int","in":"path","_id":"56f18a0b4476fb2200795e12","default":"","desc":"","name":"id"}],"results":{"codes":[{"language":"json","code":"{\n \"id\": 13557134,\n \"team_1_id\": 1876243,\n \"team_1_is_home\": true,\n \"team_2_id\": 1876249,\n \"team_2_name\": null,\n \"subseason_id\": 291621,\n \"event_id\": 307389556,\n \"status\": \"scheduled\",\n \"affects_standings\": 1,\n \"referee_signoff\": null,\n \"notes\": null,\n \"submitted_on\": null,\n \"created_at\": \"2016-04-07T11:12:41-07:00\",\n \"updated_at\": \"2016-04-07T11:17:20-07:00\",\n \"properties\": {\n \"added_periods\": null,\n \"my_num_non_overtime_periods\": null,\n \"my_num_periods\": null,\n \"overtime_intervals\": 2,\n \"overtime_length\": \"5\",\n \"quick_score_overtime\": false,\n \"quick_score_shootout\": false,\n \"regulation_time_intervals\": [\n \"20\",\n \"20\",\n \"20\"\n ],\n \"shootout_enabled\": false,\n \"time_interval_name\": \"period\",\n \"time_intervals\": [\n \"20\",\n \"20\",\n \"20\"\n ]\n },\n \"enable_live_webcast\": true,\n \"original_scorer_id\": null,\n \"last_editor_id\": null,\n \"image_id\": null,\n \"sport_id\": 1,\n \"game_id\": null,\n \"embed_code\": null,\n \"quick_score_id\": null,\n \"extra_game_details_id\": 11352841,\n \"scoring_type\": \"unscored\",\n \"live_scoring_locked\": null,\n \"division_override\": null,\n \"field_of_play_enabled\": false,\n \"game_stats_updated_at\": null,\n \"team_1_division_id\": null,\n \"team_2_division_id\": null,\n \"home_team_id\": 1876243,\n \"away_team_id\": 1876249,\n \"home_team_name\": \"Boston Bears\",\n \"home_team_abbrev\": \"Bos\",\n \"home_team_button_title\": \"Boston\",\n \"away_team_name\": \"Detroit Cyclists\",\n \"away_team_abbrev\": \"Det\",\n \"away_team_button_title\": \"Detroit\",\n \"home_team_logo\": null,\n \"away_team_logo\": null,\n \"home_team_logo_large_square\": null,\n \"away_team_logo_large_square\": null,\n \"current_period\": 0,\n \"time_remaining\": null,\n \"score_by_time_interval\": [\n \"scheduled\"\n ],\n \"home_team_score_api\": 0,\n \"away_team_score_api\": 0,\n \"comment_element_id\": 289414128,\n \"total_interval_count\": 0,\n \"game_show_url\": \"http://apidemo.sportngin.com/game/show/13557134?subseason=291621\",\n \"start_date_time\": \"2016-04-28T14:15:00-05:00\",\n \"end_date_time\": \"2016-04-28T14:15:00-05:00\",\n \"location\": \"TD Garden\",\n \"overtime_game\": false,\n \"half_point_scorable\": false,\n \"local_timezone\": \"US/Central\",\n \"permissions\": {\n \"score\": true\n },\n \"live_scoring_url\": \"https://live.sportngin.com/live/ice_hockey/13557134?auth_token=CM9Vq15fC7JxyEwgmxs3\"\n}","name":"","status":200}]}},"createdAt":"2016-03-22T18:08:11.407Z","editedParams":true,"excerpt":"The Show method returns a single Game for a given `id`.\n\n###Parameters","githubsync":"","hidden":false,"isReference":true,"project":"5641217e0ee5370d00da636d","updates":[],"user":"56e71f9edee212320019e731","version":"56cca51eca43550b002813fa","parentDoc":null,"link_external":false,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}