Method for retrieving data according to the countries

Content:

Retrieving the list of all the countries

This method is used to get the list of the countries which are active on the website. URL: https://offvariance.com/api/public/{format}/countries

An example of a request:

json:
https://offvariance.com/api/public/json/countries/?key=demokey

xml:
https://offvariance.com/api/public/xml/countries/?key=demokey

Parameters of a request:
Parameter
Description
format
Format of server response data
key
Your API key
Parameters of a response:
Parameter
Description
id
The identifier of a country in the database 
name
The name of a country on the website
application/json
text/xml
	{
		"result":[
			{
				"id":990,
				"name":"Australia"
			},
			...
		]
	}
				
	 <root>
	     <result>
	        <element-0>
	            <id>990</id>
	            <name>Australia</name>
	        </element-0>
	        ...
	     </result>
	 </root>

				

Retrieving the list of leagues (divisions) for a specified country

This method is used to get the list of the leagues (divisions) according to a specified country id. URL: https://offvariance.com/api/public/{format}/countries/{id}/{method}

An example of a request:

json:
https://offvariance.com/api/public/json/countries/2287/leagues/?key=demokey
xml:
https://offvariance.com/api/public/xml/countries/2287/leagues/?key=demokey

Parameters of a request:
Parameter
Description
format
Format of server response data
key
Your API key
id
The identifier of a country
method
The name of a method

Parameters of a response:
Parameter
Description
id
The identifier of a country in the database 
name
The name of a league (division) on the website 

application/json
text/xml
	{
		"result":[
			{
				"id":2510,
				"name":"Tipico Bundesliga"
			},
			...
		]
	}

				
	<root>
	    <result>
	       <element-0>
	           <id>2510</id>
	           <name>Tipico Bundesliga</name>
	       </element-0>
	       ...
	    </result>
	</root>
				

Retrieving the list of matches for a specified country

The method is used to get the list of matches according to a specified country id. URL: https://offvariance.com/api/public/{format}/countries/{id}/{method}

An example of a request:

json:
https://offvariance.com/api/public/json/countries/2287/matches/?key=demokey
xml:
https://offvariance.com/api/public/xml/countries/2287/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/countries/2287/matches/?key=xxxx&amp;from=1564574515&...

Parameters of a request:
Parameter
Description
format
Format of server response data
key
Your API key
id
The identifier of a country
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 the response:
Parameter
Description
id
The identifier of a match in a database
updateTime
The date of match update in a Timestamp
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>