User.countries: Difference between revisions

From Safe Creative API
Jump to navigation Jump to search
w>Jguillo
No edit summary
m 5 revisions imported
 
(3 intermediate revisions by one other user not shown)
Line 5: Line 5:
* '''Signature:''' No signature required
* '''Signature:''' No signature required
* '''Timestamp:''' Ztime is not required
* '''Timestamp:''' Ztime is not required
* '''API trust level''': Public


= Parameters =  
= Parameters =  
Line 17: Line 18:
*** '''name''': Country name
*** '''name''': Country name


= Sample =
= Example =
REQUEST:
REQUEST:


Line 26: Line 27:
RESPONSE:
RESPONSE:


<?xml version="1.0" encoding="UTF-8"?>
<pre>
'''<countries>'''
<?xml version="1.0" encoding="UTF-8"?>
   '''<country>'''
<countries>  
     '''<nowiki><code></nowiki>'''AF'''<nowiki></code></nowiki>'''
   <country>  
     '''<name>'''Afghanistan'''</name>'''
     <code>AF</code>  
   '''</country>'''
     <name>Afghanistan</name>  
   </country>  
   [...]
   [...]
   '''<country>'''
   <country>  
     '''<nowiki><code></nowiki>'''ZW'''<nowiki></code></nowiki>'''
     <code>ZW</code>  
     '''<name>'''Zimbabwe'''</name>'''
     <name>Zimbabwe</name>  
   '''</country>'''
   </country>  
'''</countries>'''
</countries>
</pre>


[[Category:API component]]
[[Category:API component]]

Latest revision as of 08:07, 7 May 2021

Returns the list of countries.

Info

  • Component name: user.countries
  • Signature: No signature required
  • Timestamp: Ztime is not required
  • API trust level: Public

Parameters

  • locale: Locale for country names

* Required parameter

Returns

  • countries
    • country
      • code: Country ISO code
      • name: Country name

Example

REQUEST:

https://api.safecreative.org/v2/
?component=user.countries
&locale=en

RESPONSE:

<?xml version="1.0" encoding="UTF-8"?>
<countries> 
  <country> 
    <code>AF</code> 
    <name>Afghanistan</name> 
  </country> 
  [...]
  <country> 
    <code>ZW</code> 
    <name>Zimbabwe</name> 
  </country> 
</countries>