{"id":13612949,"url":"https://github.com/lionheart/ASPinboard","last_synced_at":"2025-04-13T15:32:07.897Z","repository":{"id":6663338,"uuid":"7907966","full_name":"lionheart/ASPinboard","owner":"lionheart","description":"A modern, fast, and flexible Objective-C library for Pinboard.in.","archived":false,"fork":false,"pushed_at":"2018-03-10T21:49:03.000Z","size":119,"stargazers_count":83,"open_issues_count":1,"forks_count":9,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-21T04:09:17.846Z","etag":null,"topics":["bookmarking","libraries","objective-c","pinboard"],"latest_commit_sha":null,"homepage":"http://lionheartsw.com/software/pushpin","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lionheart.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-01-30T04:45:23.000Z","updated_at":"2024-05-10T10:30:55.000Z","dependencies_parsed_at":"2022-09-10T14:40:17.846Z","dependency_job_id":null,"html_url":"https://github.com/lionheart/ASPinboard","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lionheart%2FASPinboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lionheart%2FASPinboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lionheart%2FASPinboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lionheart%2FASPinboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lionheart","download_url":"https://codeload.github.com/lionheart/ASPinboard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223592372,"owners_count":17170483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bookmarking","libraries","objective-c","pinboard"],"created_at":"2024-08-01T20:00:37.063Z","updated_at":"2024-11-07T21:30:30.755Z","avatar_url":"https://github.com/lionheart.png","language":"Objective-C","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# ASPinboard\n\nASPinboard is the Objective-C library for [Pinboard](https://pinboard.in) that powers [Pushpin](http://getpushpin.com/). It uses modern Objective-C features (such as ARC and blocks), supports iOS 8.3+, and is dead-simple to integrate. As of January 2013, ASPinboard has full support for every endpoint in the [Pinboard API](https://pinboard.in/api), except [posts/recent](https://pinboard.in/api#posts_recent).\n\n## Getting Started\n\nThe first thing you'll want to do is add the files in the ASPinboard directory to your application. Alternatively, you can drag and drop the Xcode project into your existing app, and create a workspace. It's really up to you.\n\n### Quickstart\n\nASPinboard uses the Pinboard's authentication token to access protected resources. You can retrieve a token with the `authenticateWithUsername:password:success:failure` method.\n\n```objective-c\nvoid (^loginFailureBlock)(NSError *);\nloginFailureBlock = ^(NSError *error) {\n   if (error.code == PinboardErrorInvalidCredentials) {\n       // An invalid username or password was provided.\n   }\n   else if (error.code == PinboardErrorTimeout) {\n       // The authentication request will time out if\n       // it takes longer than 20 seconds to respond.\n   }\n};\n\nASPinboard *pinboard = [ASPinboard sharedInstance];\n[pinboard authenticateWithUsername:PINBOARD_USERNAME\n                          password:PINBOARD_PASSWORD\n                           success:^(NSString *token) {\n                               NSLog(@\"Your Pinboard API token is: %@\", token);\n                           }\n                           failure:loginFailureBlock];\n```\n\nAfter authenticating, ASPinboard stores the token internally for future requests.\n\nIf you want to use a token that you've previously stored or copied from your settings page, just use the `setToken` method on the ASPinboard shared instance before using ASPinboard to make requests to protected resources.\n\n```objective-c\n[pinboard setToken:token];\n```\n\n### Retrieving Bookmarks\n\nNow that you have a token, let's grab your bookmarks, shall we?\n\n```objective-c\nvoid (^successBlock)(NSArray *, NSDictionary *);\nsuccessBlock = ^(NSArray *bookmarks, NSDictionary *parameters) {\n    NSLog(@\"Here are your bookmarks:\");\n    for (id bookmark in bookmarks) {\n        NSLog(@\"url: %@\", bookmark[@\"href\"]);\n    }\n};\n\nvoid (^failureBlock)(NSError *);\nfailureBlock = ^(NSError *error) {\n   if (error != nil) {\n       NSLog(@\"Houston, we have a problem.\");\n   }\n};\n\n[pinboard bookmarksWithSuccess:successBlock failure:failureBlock];\n```\n\n### Adding a Bookmark\n\n```objective-c\n[pinboard addBookmarkWithURL:@\"https://pinboard.in/\"\n                       title:@\"Pinboard\"\n                 description:@\"A cool bookmarking site\"\n                        tags:@\"bookmarking services\"\n                      shared:YES\n                      unread:NO\n                     success:^{}\n                     failure:failureBlock];\n```\n\nThis method can also be used to update an existing bookmark. For more information, see the Pinboard documentation for [posts/add](https://pinboard.in/api#posts_add).\n\n### Other Methods\n\nPlease see ASPinboard.h for the full list of supported methods.\n\n## License\n\nASPinboard is available for use under the Apache License, Version 2.0. See [LICENSE](LICENSE) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flionheart%2FASPinboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flionheart%2FASPinboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flionheart%2FASPinboard/lists"}