User Tools

Site Tools


plugins:extend_api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
plugins:extend_api [2011/03/29 20:06]
ccagle8 [Full Example in PHP]
plugins:extend_api [2014/02/07 09:58] (current)
datiswous [PHP Example Code]
Line 1: Line 1:
-====== Using the GetSimple API ======+====== Using the GetSimple ​Extend ​API ======
  
 With the creation of GetSimple Extend comes a new API that allows developers the ability to grab vital statistics from your Extend profile and integrate them into your site or plugin. For example, A plugin developer can now code their plugin to look at our API and automatically determine if there is an update available or not. With the creation of GetSimple Extend comes a new API that allows developers the ability to grab vital statistics from your Extend profile and integrate them into your site or plugin. For example, A plugin developer can now code their plugin to look at our API and automatically determine if there is an update available or not.
Line 7: Line 7:
 **Extend ID based call:** **Extend ID based call:**
 <​code>​http://​get-simple.info/​api/​extend/?​id=##</​code>​ <​code>​http://​get-simple.info/​api/​extend/?​id=##</​code>​
-Replace ''##''​ with the ID of your plugin in our Extend repository. You can get your id by logging into Extend and viewing the particular file in question. [[http://​get-simple.info/​api/​extend/?​id=30|Live example]]+Replace ''##''​ with the ID of your plugin in our Extend repository. You can get your id by logging into Extend and viewing the particular file in question. This is the most 100% sure-fire way to identify your plugin because just as long as you do not delete your plugin from Extend, your ID will //never// change. [[http://​get-simple.info/​api/​extend/?​id=30|Live example]]
  
 **Plugin Initial File based call:** (plugins only) **Plugin Initial File based call:** (plugins only)
 <​code>​http://​get-simple.info/​api/​extend/?​file=#####​.php</​code>​ <​code>​http://​get-simple.info/​api/​extend/?​file=#####​.php</​code>​
-Replace ''#####​.php''​ with the filename of your main plugin file. In order to use this call, your plugin needs to be [[plugins:​update_notifications|packaged the correct way]] before uploaded into Extend. [[http://​get-simple.info/​api/​extend/?​id=translate.php|Live example]]+Replace ''#####​.php''​ with the filename of your main plugin file. In order to use this call, your plugin needs to be [[plugins:​update_notifications|packaged the correct way]] before uploaded into Extend. ​This will only work if your main-file is completely unique across all plugins within Extend. Try to name your main plugin file something completely unique. (This is the way that GS v3.1 checks to see if plugin updates are available.) ​[[http://​get-simple.info/​api/​extend/?​file=translate.php|Live example]]
  
 ===== API Result Set ===== ===== API Result Set =====
Line 22: Line 22:
 Since the result is in json format, you can turn the above into a PHP object array with ''​json_decode($response)''​. The resulting array will look like this: Since the result is in json format, you can turn the above into a PHP object array with ''​json_decode($response)''​. The resulting array will look like this:
  
-<​code>​+<​code ​php>
 stdClass Object stdClass Object
  
-  [author_url] => http=>//​mvlcek.bplaced.net, +  [author_url] => http=>//​mvlcek.bplaced.net 
-  [category] => Plugin, +  [category] => Plugin 
-  [downloads] => 80, +  [downloads] => 80 
-  [file] => http=>//​get-simple.info/​extend/​export/​2902/​112/​translate.zip, +  [file] => http=>//​get-simple.info/​extend/​export/​2902/​112/​translate.zip 
-  [filename_id] => translate.php, +  [filename_id] => translate.php 
-  [id] => 112, +  [id] => 112 
-  [name] => Translate, +  [name] => Translate 
-  [owner] => mvlcek, +  [owner] => mvlcek 
-  [path] => http=>//​get-simple.info/​extend/​plugin/​translate/​112/​, +  [path] => http=>//​get-simple.info/​extend/​plugin/​translate/​112/​ 
-  [rating] => , +  [rating] => 4.8 
-  [status] => successful, +  [status] => successful 
-  [support_url] => http=>//​get-simple.info/​forum/​topic/​1610/​translation-plugin/​, +  [support_url] => http=>//​get-simple.info/​forum/​topic/​1610/​translation-plugin/​ 
-  [tags] => translation,​ languages, internationalization,​ i18n, +  [tags] => translation,​ languages, internationalization,​ i18n 
-  [tested_with] => 2.03, +  [tested_with] => 2.03 
-  [updated_date] => March 25, 2011,+  [updated_date] => March 25, 2011
   [version] => 0.3   [version] => 0.3
 )</​code>​ )</​code>​
Line 47: Line 47:
 This will echo out the latest version number for the live example above. This will echo out the latest version number for the live example above.
  
-<​code>​+<​code ​php>
 $my_plugin_id = 30; // replace this with yours $my_plugin_id = 30; // replace this with yours
  
Line 60: Line 60:
 </​code>​ </​code>​
  
-===== Limitations =====+===== Extend API Limitations =====
  
-This API is only refreshed every 4 hours. This is to limit the server load for a service that does not need to be checked any more frequently than that. Please use responsibly.+This API is cached, and is allowed to be refreshed every 4 hours. ​ This is to limit the server load for a service that does not need to be checked any more frequently than that. Please use this API responsibly.
plugins/extend_api.1301429181.txt.gz · Last modified: 2013/04/19 14:57 (external edit)