User.licenses: Difference between revisions

From Safe Creative API
Jump to navigation Jump to search
w>Jguillo
No edit summary
w>Jguillo
No edit summary
Line 48: Line 48:
RESPONSE
RESPONSE


<?xml version="1.0" encoding="UTF-8"?>
<pre>
'''<listpage>'''
<?xml version="1.0" encoding="UTF-8"?>
   '''<recordtotal>'''218'''</recordtotal>'''
<listpage>
   '''<pagetotal>'''9'''</pagetotal>'''
   <recordtotal>218</recordtotal>
   '''<list>'''
   <pagetotal>9</pagetotal>
     '''<license>'''
   <list>
       '''<nowiki><code></nowiki>'''copyright'''<nowiki></code></nowiki>'''
     <license>
       '''<name>'''All rights reserved'''</name>'''
       <code>copyright</code>
       '''<shortname>'''(c)'''</shortname>'''
       <name>All rights reserved</name>
       '''<url>'''<nowiki>http://</nowiki>www.safecreative.org/license/copyright'''</url>'''
       <shortname>(c)</shortname>
       '''<features>'''
       <url>http://www.safecreative.org/license/copyright</url>
         '''<recognition>'''NOT_APPLICABLE'''</recognition>'''
       <features>
         '''<distribution>'''NO'''</distribution>'''
         <recognition>NOT_APPLICABLE</recognition>
         '''<derivations>'''NO'''</derivations>'''
         <distribution>NO</distribution>
         '''<timelimited>'''NOT_APPLICABLE'''</timelimited>'''
         <derivations>NO</derivations>
         '''<commercial>'''NO'''</commercial>'''
         <timelimited>NOT_APPLICABLE</timelimited>
       '''</features>'''
         <commercial>NO</commercial>
     '''</license>'''
       </features>
     </license>
     [...]
     [...]
     '''<license>'''
     <license>
       '''<nowiki><code></nowiki>'''<nowiki>http://</nowiki>creativecommons.org/licenses/by/2.5/my/'''<nowiki></code></nowiki>'''
       <code>http://creativecommons.org/licenses/by/2.5/my/</code>
       '''<name>'''Attribution 2.5 Malaysia'''</name>'''
       <name>Attribution 2.5 Malaysia</name>
       '''<shortname>'''CC by 2.5 my'''</shortname>'''
       <shortname>CC by 2.5 my</shortname>
       '''<url>'''<nowiki>http://</nowiki>creativecommons.org/licenses/by/2.5/my/legalcode'''</url>'''
       <url>http://creativecommons.org/licenses/by/2.5/my/legalcode</url>
       '''<jurisdiction>'''my'''</jurisdiction>'''
       <jurisdiction>my</jurisdiction>
       '''<features>'''
       <features>
         '''<recognition>'''YES'''</recognition>'''
         <recognition>YES</recognition>
         '''<distribution>'''YES'''</distribution>'''
         <distribution>YES</distribution>
         '''<derivations>'''YES'''</derivations>'''
         <derivations>YES</derivations>
         '''<timelimited>'''NOT_APPLICABLE'''</timelimited>'''
         <timelimited>NOT_APPLICABLE</timelimited>
         '''<commercial>'''YES'''</commercial>'''
         <commercial>YES</commercial>
       '''</features>'''
       </features>
     '''</license>'''
     </license>
   '''</list>'''
   </list>
'''</listpage>'''
</listpage>
</pre>


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

Revision as of 08:31, 5 May 2010

Returns a paginated list of licenses which are available to the user.

Info

  • Component name: user.licenses
  • Signature: Requires signature using the authkey's private key
  • Timestamp: Requires ztime parameter

Parameters

  • authkey*: The user's authorization key
  • ztime*: Z-Timestamp
  • page: Page to return (default 1)
  • locale: Locale for license names

* Required parameter

Returns

Paginated list of license elements:

  • license
    • code: License code
    • name: License name
    • shortname: License abbreviation
    • url: URL to the license full text
    • features: License features
      • recognition: Work original authorship must be recognised
      • distribution: Work can be copied and distributed
      • derivations: New works can be created based upon this work
      • timelimited: License has a limited period of application, which must be specified when registering the work (using these kind of licenses is a professional service)
      • commercial: Work can be used for commercial purposes

License features can have one of the following values:

  • YES: Feature is applicable
  • NO: Feature is not applicable
  • YES_WITH_RESTRICTIONS: Feature is applicable with some conditions imposed by the license text
  • INHERITANCE: (Only for derivations feature) Derivative works must be distributed with the same license
  • NOT_APPLICABLE: Feature has no meaning for this license

Sample

REQUEST

https://api.safecreative.org/v2/
?authkey=1i5g2aaf2bz09lyo867cuimqg
&component=user.licenses
&page=1
&ztime=1271749823888
&signature=0c740f90e64eac87502c4a0630363ad65fbad7ec

RESPONSE

<?xml version="1.0" encoding="UTF-8"?>
<listpage>
   <recordtotal>218</recordtotal>
   <pagetotal>9</pagetotal>
   <list>
     <license>
       <code>copyright</code>
       <name>All rights reserved</name>
       <shortname>(c)</shortname>
       <url>http://www.safecreative.org/license/copyright</url>
       <features>
         <recognition>NOT_APPLICABLE</recognition>
         <distribution>NO</distribution>
         <derivations>NO</derivations>
         <timelimited>NOT_APPLICABLE</timelimited>
         <commercial>NO</commercial>
       </features>
     </license>
     [...]
     <license>
       <code>http://creativecommons.org/licenses/by/2.5/my/</code>
       <name>Attribution 2.5 Malaysia</name>
       <shortname>CC by 2.5 my</shortname>
       <url>http://creativecommons.org/licenses/by/2.5/my/legalcode</url>
       <jurisdiction>my</jurisdiction>
       <features>
         <recognition>YES</recognition>
         <distribution>YES</distribution>
         <derivations>YES</derivations>
         <timelimited>NOT_APPLICABLE</timelimited>
         <commercial>YES</commercial>
       </features>
     </license>
   </list>
</listpage>