PHP Class PinboardAPI

URL: http://github.com/kijin/pinboard-api Version: 0.3.2 Copyright (c) 2012-2016, Kijin Sung Copyright (c) 2014, Erin Dalzell Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Afficher le fichier Open project: kijin/pinboard-api Class Usage Examples

Méthodes publiques

Свойство Type Description
$_instance_hashes

Protected Properties

Свойство Type Description
$_connection_timeout
$_curl_handle
$_instance_hash
$_last_status
$_logging_callback
$_pass
$_request_timeout
$_user

Méthodes publiques

Méthode Description
__construct ( $user, $pass, $connection_timeout = 10, $request_timeout = 30 ) Constructor.
__destruct ( ) Destructor.
delete ( $bookmark ) Delete a bookmark.
delete_tag ( $tag ) Delete a tag.
dump ( ) Dump all your bookmarks in an importable format.
enable_logging ( $func ) Enable logging to a user-specified function.
get ( $url = null, $tags = null, $date = null ) Get some bookmarks.
get_all ( $count = null, $offset = null, $tags = null, $from = null, $to = null ) Get all bookmarks.
get_api_token ( ) Get the user's API token.
get_dates ( $tags = null ) Get dates.
get_last_status ( ) Get the last status code.
get_note ( $id ) Get a single note.
get_recent ( $count = 15, $tags = null ) Get recent bookmarks.
get_rss_token ( ) Get the user's secret RSS token.
get_suggested_tags ( $bookmark ) Get tag suggestions for a bookmark.
get_tags ( ) Get all tags.
get_updated_time ( ) Call this before get_all() to check for updates.
list_notes ( ) Get the list of notes.
rename_tag ( $old, $new ) Rename a tag.
save ( $bookmark, $replace = true ) Save a new bookmark. (This include both adding and editing.)
search_by_date ( $date )
search_by_interval ( $from, $to )
search_by_tag ( $tags )
search_by_url ( $url ) Some shortcuts to the above.

Méthodes protégées

Méthode Description
_json_to_bookmark ( $json ) This method builds a PinboardBookmark object from an XML element.
_json_to_note ( $json ) This method builds a PinboardNote object from an XML element.
_json_to_status ( $json ) This method translates XML responses into boolean status codes.
_normalize_tags ( $tags ) Normalize tags.
_remote ( $method, $args = [], $use_json = true ) This method handles all remote method calls.
_to_datetime ( $timestamp ) This method translates timestamps into Pinboard API's datetime format.

Method Details

__construct() public méthode

Constructor.
public __construct ( $user, $pass, $connection_timeout = 10, $request_timeout = 30 )

__destruct() public méthode

Destructor.
public __destruct ( )

_json_to_bookmark() protected méthode

This method builds a PinboardBookmark object from an XML element.
protected _json_to_bookmark ( $json )

_json_to_note() protected méthode

This method builds a PinboardNote object from an XML element.
protected _json_to_note ( $json )

_json_to_status() protected méthode

This method translates XML responses into boolean status codes.
protected _json_to_status ( $json )

_normalize_tags() protected méthode

Normalize tags.
protected _normalize_tags ( $tags )

_remote() protected méthode

This method handles all remote method calls.
protected _remote ( $method, $args = [], $use_json = true )

_to_datetime() protected méthode

This method translates timestamps into Pinboard API's datetime format.
protected _to_datetime ( $timestamp )

delete() public méthode

Delete a bookmark.
public delete ( $bookmark )

delete_tag() public méthode

Delete a tag.
public delete_tag ( $tag )

dump() public méthode

Dump all your bookmarks in an importable format.
public dump ( )

enable_logging() public méthode

Enable logging to a user-specified function.
public enable_logging ( $func )

get() public méthode

Get some bookmarks.
public get ( $url = null, $tags = null, $date = null )

get_all() public méthode

Get all bookmarks.
public get_all ( $count = null, $offset = null, $tags = null, $from = null, $to = null )

get_api_token() public méthode

Get the user's API token.
public get_api_token ( )

get_dates() public méthode

Get dates.
public get_dates ( $tags = null )

get_last_status() public méthode

Get the last status code.
public get_last_status ( )

get_note() public méthode

Get a single note.
public get_note ( $id )

get_recent() public méthode

Get recent bookmarks.
public get_recent ( $count = 15, $tags = null )

get_rss_token() public méthode

Get the user's secret RSS token.
public get_rss_token ( )

get_suggested_tags() public méthode

Get tag suggestions for a bookmark.
public get_suggested_tags ( $bookmark )

get_tags() public méthode

Get all tags.
public get_tags ( )

get_updated_time() public méthode

Call this before get_all() to check for updates.
public get_updated_time ( )

list_notes() public méthode

Get the list of notes.
public list_notes ( )

rename_tag() public méthode

Rename a tag.
public rename_tag ( $old, $new )

save() public méthode

Save a new bookmark. (This include both adding and editing.)
public save ( $bookmark, $replace = true )

search_by_date() public méthode

public search_by_date ( $date )

search_by_interval() public méthode

public search_by_interval ( $from, $to )

search_by_tag() public méthode

public search_by_tag ( $tags )

search_by_url() public méthode

Some shortcuts to the above.
public search_by_url ( $url )

Property Details

$_connection_timeout protected_oe property

protected $_connection_timeout

$_curl_handle protected_oe property

protected $_curl_handle

$_instance_hash protected_oe property

protected $_instance_hash

$_instance_hashes public_oe static_oe property

public static $_instance_hashes

$_last_status protected_oe property

protected $_last_status

$_logging_callback protected_oe property

protected $_logging_callback

$_pass protected_oe property

protected $_pass

$_request_timeout protected_oe property

protected $_request_timeout

$_user protected_oe property

protected $_user