PHP Класс 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.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$_instance_hashes

Защищенные свойства (Protected)

Свойство Тип Описание
$_connection_timeout
$_curl_handle
$_instance_hash
$_last_status
$_logging_callback
$_pass
$_request_timeout
$_user

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
_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.

Описание методов

__construct() публичный Метод

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

__destruct() публичный Метод

Destructor.
public __destruct ( )

_json_to_bookmark() защищенный Метод

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

_json_to_note() защищенный Метод

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

_json_to_status() защищенный Метод

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

_normalize_tags() защищенный Метод

Normalize tags.
protected _normalize_tags ( $tags )

_remote() защищенный Метод

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

_to_datetime() защищенный Метод

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

delete() публичный Метод

Delete a bookmark.
public delete ( $bookmark )

delete_tag() публичный Метод

Delete a tag.
public delete_tag ( $tag )

dump() публичный Метод

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

enable_logging() публичный Метод

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

get() публичный Метод

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

get_all() публичный Метод

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

get_api_token() публичный Метод

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

get_dates() публичный Метод

Get dates.
public get_dates ( $tags = null )

get_last_status() публичный Метод

Get the last status code.
public get_last_status ( )

get_note() публичный Метод

Get a single note.
public get_note ( $id )

get_recent() публичный Метод

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

get_rss_token() публичный Метод

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

get_suggested_tags() публичный Метод

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

get_tags() публичный Метод

Get all tags.
public get_tags ( )

get_updated_time() публичный Метод

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

list_notes() публичный Метод

Get the list of notes.
public list_notes ( )

rename_tag() публичный Метод

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

save() публичный Метод

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

search_by_date() публичный Метод

public search_by_date ( $date )

search_by_interval() публичный Метод

public search_by_interval ( $from, $to )

search_by_tag() публичный Метод

public search_by_tag ( $tags )

search_by_url() публичный Метод

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

Описание свойств

$_connection_timeout защищенное свойство

protected $_connection_timeout

$_curl_handle защищенное свойство

protected $_curl_handle

$_instance_hash защищенное свойство

protected $_instance_hash

$_instance_hashes публичное статическое свойство

public static $_instance_hashes

$_last_status защищенное свойство

protected $_last_status

$_logging_callback защищенное свойство

protected $_logging_callback

$_pass защищенное свойство

protected $_pass

$_request_timeout защищенное свойство

protected $_request_timeout

$_user защищенное свойство

protected $_user