C# Class WeiranZhang.InstapaperAPI.API

显示文件 Open project: weiran/Metropaper

Public Methods

Method Description
API ( ) : System
API ( string token, string tokenSecret ) : System
AddBookmark ( string url, Action onCompletion, string title = "", string description = "", int folderId = null, bool resolveFinalUrl = true ) : void
ArchiveBookmark ( long bookmarkId, System.Action onCompletion ) : void
DeleteBookmark ( long bookmarkId, System.Action onCompletion ) : void
GetAccessToken ( string username, string password, Action onCompletion ) : void
GetArchiveBookmarks ( bool showLoadingText, Action onCompletion ) : void
GetBookmarkText ( long bookmarkId, Action onCompletion ) : void
GetBookmarkTextSync ( long bookmarkId ) : string
GetBookmarks ( string folderId, List existingBookmarks, bool showLoadingText, Action onCompletion ) : void
GetStarredBookmarks ( bool showLoadingText, Action onCompletion ) : void
GetUnreadBookmarks ( List existingBookmarks, bool showLoadingText, Action onCompletion ) : void
ListFolders ( System.Action onCompletion ) : void
StarBookmark ( long bookmarkId, bool isStarred, System.Action onCompletion ) : void
UpdateReadProgress ( long bookmarkId, double progress, System.DateTime progressTimestamp, System.Action onCompletion ) : void
VerifyCredentials ( Action onCompletion ) : void

Private Methods

Method Description
GetBookmarkHaveList ( List bookmarks ) : string

Method Details

API() public method

public API ( ) : System
return System

API() public method

public API ( string token, string tokenSecret ) : System
token string
tokenSecret string
return System

AddBookmark() public method

public AddBookmark ( string url, Action onCompletion, string title = "", string description = "", int folderId = null, bool resolveFinalUrl = true ) : void
url string
onCompletion Action
title string
description string
folderId int
resolveFinalUrl bool
return void

ArchiveBookmark() public method

public ArchiveBookmark ( long bookmarkId, System.Action onCompletion ) : void
bookmarkId long
onCompletion System.Action
return void

DeleteBookmark() public method

public DeleteBookmark ( long bookmarkId, System.Action onCompletion ) : void
bookmarkId long
onCompletion System.Action
return void

GetAccessToken() public method

public GetAccessToken ( string username, string password, Action onCompletion ) : void
username string
password string
onCompletion Action
return void

GetArchiveBookmarks() public method

public GetArchiveBookmarks ( bool showLoadingText, Action onCompletion ) : void
showLoadingText bool
onCompletion Action
return void

GetBookmarkText() public method

public GetBookmarkText ( long bookmarkId, Action onCompletion ) : void
bookmarkId long
onCompletion Action
return void

GetBookmarkTextSync() public method

public GetBookmarkTextSync ( long bookmarkId ) : string
bookmarkId long
return string

GetBookmarks() public method

public GetBookmarks ( string folderId, List existingBookmarks, bool showLoadingText, Action onCompletion ) : void
folderId string
existingBookmarks List
showLoadingText bool
onCompletion Action
return void

GetStarredBookmarks() public method

public GetStarredBookmarks ( bool showLoadingText, Action onCompletion ) : void
showLoadingText bool
onCompletion Action
return void

GetUnreadBookmarks() public method

public GetUnreadBookmarks ( List existingBookmarks, bool showLoadingText, Action onCompletion ) : void
existingBookmarks List
showLoadingText bool
onCompletion Action
return void

ListFolders() public method

public ListFolders ( System.Action onCompletion ) : void
onCompletion System.Action
return void

StarBookmark() public method

public StarBookmark ( long bookmarkId, bool isStarred, System.Action onCompletion ) : void
bookmarkId long
isStarred bool
onCompletion System.Action
return void

UpdateReadProgress() public method

public UpdateReadProgress ( long bookmarkId, double progress, System.DateTime progressTimestamp, System.Action onCompletion ) : void
bookmarkId long
progress double
progressTimestamp System.DateTime
onCompletion System.Action
return void

VerifyCredentials() public method

public VerifyCredentials ( Action onCompletion ) : void
onCompletion Action
return void