[ Index ]

PHP Cross Reference of YOURLS

title

Body

[close]

/includes/ -> functions-api.php (summary)

(no description)

File Size: 241 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 11 functions

  yourls_api_action_shorturl()
  yourls_api_action_stats()
  yourls_api_action_db_stats()
  yourls_api_action_url_stats()
  yourls_api_action_expand()
  yourls_api_action_version()
  yourls_api_output()
  yourls_api_stats()
  yourls_api_db_stats()
  yourls_api_url_stats()
  yourls_api_expand()

Functions
Functions that are not part of a class:

yourls_api_action_shorturl()   X-Ref
API function wrapper: Shorten a URL

since: 1.6
return: array Result of API call

yourls_api_action_stats()   X-Ref
API function wrapper: Stats about links (XX top, bottom, last, rand)

since: 1.6
return: array Result of API call

yourls_api_action_db_stats()   X-Ref
API function wrapper: Just the global counts of shorturls and clicks

since: 1.6
return: array Result of API call

yourls_api_action_url_stats()   X-Ref
API function wrapper: Stats for a shorturl

since: 1.6
return: array Result of API call

yourls_api_action_expand()   X-Ref
API function wrapper: Expand a short link

since: 1.6
return: array Result of API call

yourls_api_action_version()   X-Ref
API function wrapper: return version numbers

since: 1.6
return: array Result of API call

yourls_api_output( $mode, $output, $send_headers = true, $echo = true )   X-Ref
Output and return API result

This function will echo (or only return if asked) an array as JSON, JSONP or XML. If the array has a
'simple' key, it can also output that key as unformatted text if expected output mode is 'simple'

Most likely, script should not do anything after outputting this

since: 1.6
return: string                API output, as an XML / JSON / JSONP / raw text string
param: string $mode          Expected output mode ('json', 'jsonp', 'xml', 'simple')
param: array  $output        Array of things to output
param: bool   $send_headers  Optional, default true: Whether a headers (status, content type) should be sent or not
param: bool   $echo          Optional, default true: Whether the output should be outputted or just returned

yourls_api_stats($filter = 'top', $limit = 10, $start = 0 )   X-Ref
Return array for API stat requests

return: array
param: string $filter  either "top", "bottom" , "rand" or "last"
param: int    $limit   maximum number of links to return
param: int    $start   offset

yourls_api_db_stats()   X-Ref
Return array for counts of shorturls and clicks

return: array

yourls_api_url_stats( $shorturl )   X-Ref
Return array for API stat requests

return: array
param: string $shorturl  Short URL to check

yourls_api_expand( $shorturl )   X-Ref
Expand short url to long url

return: array
param: string $shorturl  Short URL to expand



Generated: Wed Sep 28 05:10:02 2022 Cross-referenced by PHPXref 0.7.1