{"id":20187358,"url":"https://github.com/wordpress-mobile/wpxmlrpc","last_synced_at":"2025-04-03T02:12:02.922Z","repository":{"id":7026486,"uuid":"8299421","full_name":"wordpress-mobile/wpxmlrpc","owner":"wordpress-mobile","description":"A lightweight XML-RPC encoder/decoder for iOS, OS X, and tvOS","archived":false,"fork":false,"pushed_at":"2024-01-29T22:46:55.000Z","size":1040,"stargazers_count":87,"open_issues_count":5,"forks_count":34,"subscribers_count":26,"default_branch":"trunk","last_synced_at":"2025-03-24T07:41:48.054Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wordpress-mobile.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"Support/Info-Tests.plist","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-02-19T21:04:06.000Z","updated_at":"2025-01-06T13:47:33.000Z","dependencies_parsed_at":"2024-01-11T00:57:02.042Z","dependency_job_id":"2f8ac4a7-1b2e-4c7b-9de9-97c076c47e80","html_url":"https://github.com/wordpress-mobile/wpxmlrpc","commit_stats":{"total_commits":290,"total_committers":29,"mean_commits":10.0,"dds":0.7275862068965517,"last_synced_commit":"bfc413d336bdeaab89e62dc483380baa99b2257e"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wordpress-mobile%2Fwpxmlrpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wordpress-mobile%2Fwpxmlrpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wordpress-mobile%2Fwpxmlrpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wordpress-mobile%2Fwpxmlrpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wordpress-mobile","download_url":"https://codeload.github.com/wordpress-mobile/wpxmlrpc/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246922248,"owners_count":20855345,"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":[],"created_at":"2024-11-14T03:23:10.798Z","updated_at":"2025-04-03T02:12:02.879Z","avatar_url":"https://github.com/wordpress-mobile.png","language":"Objective-C","readme":"# WordPress XML-RPC Framework\n\nThe WordPress XML-RPC library is a lightweight XML-RPC client for iOS\nand OS X.\n\nIt's based on Eric Czarny's Cocoa XML-RPC Framework, but without all the\nnetworking code, and a few additions of our own.\n\n# Installation\n\nWordPress XML-RPC uses [CocoaPods](http://cocoapods.org/) for easy\ndependency management.\n\nJust add this to your Podfile and run `pod install`:\n\n\tpod 'wpxmlrpc'\n\nAnother option, if you don't use CocoaPods, is to copy the `WPXMLRPC`\nfolder to your project.\n\n# Usage\n\nWordPress XML-RPC only provides classes to encode and decode XML-RPC. You are free to use your favorite networking library.\n\n## Building a XML-RPC request\n\n\tNSURL *URL = [NSURL URLWithString:@\"http://example.com/xmlrpc\"];\n\tNSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:URL];\n\t[request setHTTPMethod:@\"POST\"];\n\t\n\tWPXMLRPCEncoder *encoder = [[WPXMLRPCEncoder alloc] initWithMethod:@\"demo.addTwoNumbers\" andParameters:@[@1, @2]];\n\t[request setHTTPBody:[encoder dataEncodedWithError:nil]];\n\n## Building a XML-RPC request using streaming\n\tNSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);\n    NSString *directory = [paths objectAtIndex:0];\n    NSString *guid = [[NSProcessInfo processInfo] globallyUniqueString];\n    NSString *streamingCacheFilePath = [directory stringByAppendingPathComponent:guid];\n\n\tNSURL *URL = [NSURL URLWithString:@\"http://example.com/xmlrpc\"];\n\tNSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:URL];\n\t[request setHTTPMethod:@\"POST\"];\n\t\n\tNSInputStream *fileStream = [NSInputStream inputStreamWithFileAtPath:filePath];\n\tWPXMLRPCEncoder *encoder = [[WPXMLRPCEncoder alloc] initWithMethod:@\"test.uploadFile\" andParameters:@[fileStream]];\t      \n\t\n\t[encoder encodeToFile:streamingCacheFilePath error:nil];\n\n\tNSError *error = nil;\n    NSDictionary *attributes = [[NSFileManager defaultManager] attributesOfItemAtPath:filePath error:\u0026error];\n    unsigned long contentLength = [[attributes objectForKey:NSFileSize] unsignedIntegerValue];\n    NSInputStream * inputStream = [NSInputStream inputStreamWithFileAtPath:filePath]; \n\n\t[request setHTTPBodyStream:inputStream];\n\t[request setValue:[NSString stringWithFormat:@\"%lu\", contentLength] forHTTPHeaderField:@\"Content-Length\"];\n\n## Parsing a XML-RPC response\n\n\tNSData *responseData = …\n\tWPXMLRPCDecoder *decoder = [[WPXMLRPCDecoder alloc] initWithData:responseData];\n\tif ([decoder isFault]) {\n\t\tNSLog(@\"XML-RPC error %@: %@\", [decoder faultCode], [decoder faultString]);\n\t} else {\n\t\tNSLog(@\"XML-RPC response: %@\", [decoder object]);\n\t}\n\n# Acknowledgments\n\nThe Base64 encoder/decoder found in NSData+Base64 is created by [Matt Gallagher](http://cocoawithlove.com/2009/06/base64-encoding-options-on-mac-and.html).\n\nThe original Cocoa XML-RPC Framework was developed by [Eric Czarny](https://github.com/eczarny/xmlrpc) and now lives at [github.com/corristo/xmlrpc](https://github.com/corristo/xmlrpc)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwordpress-mobile%2Fwpxmlrpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwordpress-mobile%2Fwpxmlrpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwordpress-mobile%2Fwpxmlrpc/lists"}