Method for retrieving data according to the leagues

Content:

Retrieving the list of seasons according to a specified league

The method is used to get the list of the seasons according to the specified league id. URL: https://offvariance.com/api/public/{format}/leagues/{id}/{method}

An example of a request:
json:
https://offvariance.com/api/public/json/leagues/2510/seasons/?key=demokey
xml:
https://offvariance.com/api/public/xml/leagues/2510/seasons/?key=demokey

Parameters of a request:
Parameter
Description
format
Format of server response data
key
Your API key
id
The identifier of a league (division)
method
The name of a method
Parameters of a response:
Parameter
Description
id
The identifier of a league (division) in the database
method
The name of a method
application/json
text/xml
	{
		"result":[
			{
				"id":3331,
				"name": "2019/2020"
			},
			...
		]
	}

				
	 <root>
	     <result>
	        <element-0>
	            <id>3331</id>
	            <name>2019/2020</name>
	        </element-0>
	        ...
	     </result>
	 </root>
				

Retrieving the list of matches for a specified league

The method is used to get the list of the matches for a specified league id (division id). URL: https://offvariance.com/api/public/{format}/leagues/{id}/{method}

An example of a request:
json:
https://offvariance.com/api/public/json/leagues/2510/matches/?key=demokey
xml:
https://offvariance.com/api/public/xml/leagues/2510/matches/?key=demokey

Matches are filtered by the next methods:

  • ".../matches/updates/" method is used to filter the matches by the updates on the website;
  • ".../matches/dates/" method is used to filter the matches by the date of a match.
Both methods include two parameters to state the range of filtration: "from" and "to".
 
An example of usage: 
https://offvariance.com/api/public/json/leagues/2510/matches/?key=xxxx&amp;from=1564574515&a...

Parameters of a request:
Parameter
Description
format
Format of server response data
key
Your API key
id
The identifier of a league
method
The name of the method
updateTimestamp
Date in a Timestamp. Not compulsory. Allows filtering the matches by displaying only the matches whose date is bigger than the specified date. Outdated parameter.
Parameters of a response:
Parameter
Description
id
The identifier of a match in a database
updateTime
The identifier of a match in a database
dateMatch
The date of the match in a Timestamp
application/json
text/xml
	{
		"result":[
			{
				"id":63078,
				"updateTime":1564574094
			},
			...
		]
	}


				
	 <root>
	     <result>
	        <element-0>
	            <id>63078</id>
	            <updateTime>1564574094</updateTime>
	        </element-0>
	        ...
	     </result>
	 </root>