Advertisement
Guest User

omg ap

a guest
Feb 26th, 2014
431
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.94 KB | None | 0 0
  1. ----------------------------------API DOC----------------------------------
  2.  
  3. Information
  4. These notes relate to v2.0 of our API
  5.  
  6. To access the API you will need an API Key. This can be found in Here
  7.  
  8. *A VIP Account is Required*
  9.  
  10. You should use the HTTPS GET method for sending queries to the sever. POST method is not supported.
  11. ANY Abuse of the API will result in an API ban, and or further restrictions.
  12. We reserve the right to ban any user(s), IP(s) etc without notice, if in breach of the above.
  13.  
  14.  
  15. API Rate Limits:
  16. We have a "Daily Requests" and a "Daily Download" limit. These couters are updated daily.
  17.  
  18. The current rate limits are as follows:
  19. DAILY REQUESTS LIMITATION: tbc!
  20. DAILY DOWNLOAD LIMITATION: tbc!
  21.  
  22.  
  23. JSON Search API
  24. url to use:
  25.  
  26. https://api.omgwtfnzbs.org/json/?search={some search term}&user={username}&api={apikey}
  27.  
  28. variables:
  29.  
  30. * ?search=something = No terms no search!
  31. * &user={username} = Your account username.
  32. * &api={apikey} = Your API Key.
  33. * &catid=1,2,3 ect = Optional, search multiple categorys.
  34. * &retention={days} = Optional, limit the search to X amount of days ago.
  35. * &eng=1 = Optional, return only english/unknown posts.
  36.  
  37. example api Call:
  38.  
  39. https://api.omgwtfnzbs.org/json/?search=bones.s08&user=you&api=apikeyfoundinyraccount&catid=19,20&retention=500
  40. this would search for bones.s08 in tvsd,tvhd with a max age of 500 days.
  41.  
  42. sample output:
  43.  
  44. [
  45. {
  46. nzbid: "100677",
  47. release: "Some.Movie.Title-GRP",
  48. group: "alt.binaries.moovee",
  49. sizebytes: "1601590891",
  50. usenetage: "1317286337",
  51. categoryid: "15",
  52. cattext: "movies.sd",
  53. language: "11",
  54. weblink: "http://example.com/",
  55. details: "https://omgwtfnzbs.org/details.php?id={nzbid}",
  56. getnzb: "https://api.omgwtfnzbs.org/sn.php?id={nzbid}&user={username}&api={apikey}"
  57. }
  58. ]
  59. If your request was successful you will get upto 500 results listed in JSON format
  60.  
  61.  
  62. other responses:
  63.  
  64. * {"notice":"no search no results"} = Search term is required
  65. * {"notice":"0 results matched your terms"} = No results for your query were found
  66. * {"notice":"search to short"} = min term must be 3 characters or more ([a-Z0-9]) any other characters will be ignored
  67. * {"notice":"your user or api information is incorrect.. check and try again"} = Bad/Incorrect api auth details
  68.  
  69.  
  70. XML Search API: (updated 9th March 2013)
  71. url to use:
  72. https://api.omgwtfnzbs.org/xml/?search={some search term}&user={username}&api={apikey}
  73.  
  74. variables:
  75. * ?search=something = string to search for (also see special features)
  76. * &username={username} = Your account username.
  77. * &api={apikey} = Your API Key.
  78. * &catid=1,2,3 ect = Optional, search multiple categorys.
  79. * &eng=1 = Optional, return only english/unknown posts.
  80. * &retention={days} = Optional, limit the search to X amount of days ago.
  81. * &page={#} = go to the next page of results if there is any.
  82.  
  83. If your request was successful you will get upto 500 results per page listed in xml format
  84.  
  85. special features:
  86. * ?search= Sending a request with a blank search term will return results from the last 7 days &retention= will have no effect on your query
  87. * ?search=tt1234567 = Search using the IMDB id. (if included at time of index)
  88.  
  89. sample output:
  90.  
  91. <xml version="1.0" encoding="ISO-8859-1">
  92.  
  93. <info>
  94. <results>100</results>
  95. <pages>2</pages>
  96. <current_page>1</current_page>
  97. <published>server time request was published</published
  98. </info>
  99.  
  100. <search_req>
  101.  
  102. <post>
  103. <release>Some.FLAC.Release.Name-INFO</release>
  104. <group>alt.binaries.sounds.flac</group>
  105. <sizebytes>286396335</sizebytes>
  106. <usenetage>1338679302</usenetage>
  107. <categoryid>22</categoryid>
  108. <cattext>music.flac</cattext>
  109. <language>0</language>
  110. <imglink>https://if-added.jpg</imglink>
  111. <weblink>http://weblink.net</weblink>
  112. <details>https://omgwtfnzbs.org/details.php?id={nzbid}</details>
  113. <getnfo>https://api.omgwtfnzbs.org/nfo/?id={nzbid}&user={username}&api={apikey}/getnfo>
  114. <getnzb>https://api.omgwtfnzbs.org/sn.php?id={nzbid}&user={username}&api={apikey}</getnzb>
  115. </post>
  116.  
  117. </search_req>
  118. </xml>
  119. Notice:
  120. All requests are cached for 10 minutes to reduce the load on the server.
  121.  
  122.  
  123. other responses:
  124.  
  125. * {no search no xml} = Search term is required
  126. * {invalid search terms} = Invalid search term
  127. * {0 results found} = No results for your query were found
  128. * {search to short} = min term must be 3 characters or more.
  129. * {your user/api information is incorrect.. check and try again} = Bad/Incorrect api auth details
  130.  
  131.  
  132. Direct Download API:
  133. No HTML output is generated and the NZB is sent directly to your software/browser etc.
  134.  
  135. url to use:
  136. https://api.omgwtfnzbs.org/sn.php?id={nzbid#}&user={username}&api={apikey}
  137.  
  138. variables:
  139. * ?id={nzbid#} = taken from omgwtfnzbs.org
  140. * &user={username} = Your account username.
  141. * &api={apikey} = Your API Key.
  142.  
  143. output results:
  144. If your request was successful the NZB will be sent directly to your browser/software.
  145.  
  146. If there was a problem with your request one the following responses will be output.
  147.  
  148. * {your user/api information is incorrect.. check and try again} = There is a problem with the username/apikey you have provided.
  149. * {bad nzbid#} = Invalid nzbid#.
  150.  
  151. notes:
  152. Only full posts can be retrieved, there is no support for partial posts.
  153. Only one post can be downloaded per request.
  154.  
  155.  
  156. GET NFO API:
  157. url to use:
  158. https://api.omgwtfnzbs.org/nfo/?id={NZBID}&user={username}&api={apikey}
  159.  
  160. variables:
  161. * ?id={nzbid#} = taken from omgwtfnzbs.org
  162. * &user={username} = Your account username.
  163. * &api={apikey} = Your API Key.
  164.  
  165. output results:
  166. If your request was successful the NFO will be displayed in your browser/software.
  167.  
  168. If there was a problem with your request one the following responses will be output.
  169.  
  170. * {your user/api information is incorrect.. check and try again} = There is a problem with the username/apikey you have provided.
  171. * {bad nzbid#} = Invalid nzbid#.
  172. * {nfo unavailable} = No NFO file has been linked to nzbid#.
  173.  
  174. notes:
  175. Only one NFO can be viewed per request.
  176.  
  177. ----------------------------------API DOC----------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement