urlyar.interface.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. /*
  3. * URLYarLib Name: urlyar.interface - JZ Shortener Component (URLYar) Interface
  4. * URLYarLib Description: This is the interface declarion for component classes of the main ss_shortener
  5. * classname: urlyar_interface
  6. * version: 1.1.0
  7. * link: http://urlyar.ir
  8. * author: Sasan Salamzadeh <me@salamzadeh.net>
  9. */
  10. if (!interface_exists('urlyar_interface')) :
  11. interface urlyar_interface
  12. {
  13. /*
  14. *****************************************
  15. * Methods
  16. *****************************************
  17. */
  18. function generate($url); //main generator
  19. function config($key, $user, $generic); //config call to parent
  20. function api_list(); //calls parent api_list function with parameter
  21. function set_service($service); //loads $api_config and service into parent class
  22. /*
  23. *****************************************
  24. * Variables
  25. *****************************************
  26. */
  27. /*
  28. private $ua_string
  29. Stores the replacement UA String.
  30. ----------------------------------------------------------------
  31. private $api_config = array()
  32. ----------------------------------------------------------------
  33. - name
  34. Display name
  35. - endpoint
  36. URL to send request to
  37. - format
  38. JSON, XML, TXT, or any special formats
  39. - ua (TRUE/FALSE)
  40. Override UA strings
  41. - override
  42. Override WP_HTTP. i.e. Use normal methods of request
  43. - method (POST / GET )
  44. - sticky
  45. Append to front of generated API listing
  46. - type
  47. NULL = disabled / suspended
  48. 0 = no auth/key required
  49. 1 = authuser
  50. 2 = authkey
  51. 3 = authuser & key
  52. 4 = requser
  53. 5 = reqkey
  54. 6 = requser & key
  55. 101 - 200 = Generic / Special
  56. sub = child of a complex type
  57. ----------------------------------------------------------------
  58. */
  59. //end interface
  60. }
  61. endif;
  62. ?>