├── .gitignore ├── .travis.yml ├── LICENSE.md ├── Podfile ├── Podfile.lock ├── README.md ├── WPCKitDemo ├── Podfile ├── Podfile.lock ├── WPCKitDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── WPCKitDemo.xcworkspace │ └── contents.xcworkspacedata └── WPCKitDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── WordPressComKit.podspec ├── WordPressComKit.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcshareddata │ └── xcschemes │ └── WordPressComKit.xcscheme ├── WordPressComKit.xcworkspace └── contents.xcworkspacedata ├── WordPressComKit ├── Alamofire+Extensions.swift ├── AuthenticationService.swift ├── DateHelpers.swift ├── Info.plist ├── Me.swift ├── MeService.swift ├── Media.swift ├── MediaService.swift ├── Post.swift ├── PostService.swift ├── RequestRouter.swift ├── Site.swift ├── SiteService.swift ├── WordPressComAPIHelpers.swift └── WordPressComKit.h ├── WordPressComKitTests ├── DateHelpersTests.swift ├── Info.plist ├── MeServiceTests.swift ├── MediaServiceTests.swift ├── PostServiceTests.swift ├── SiteServiceTests.swift ├── Test Assets │ └── wordpress-logo.png └── Test Data │ ├── me-2.json │ ├── me.json │ ├── media.json │ ├── post-new.json │ ├── post.json │ ├── site.json │ └── sites.json └── test.sh /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata 19 | 20 | ## Other 21 | *.xccheckout 22 | *.moved-aside 23 | *.xcuserstate 24 | *.xcscmblueprint 25 | 26 | ## Obj-C/Swift specific 27 | *.hmap 28 | *.ipa 29 | 30 | # CocoaPods 31 | # 32 | # We recommend against adding the Pods directory to your .gitignore. However 33 | # you should judge for yourself, the pros and cons are mentioned at: 34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 35 | # 36 | Pods/ 37 | 38 | # Carthage 39 | # 40 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 41 | # Carthage/Checkouts 42 | 43 | Carthage/Build 44 | 45 | # fastlane 46 | # 47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 48 | # screenshots whenever they are needed. 49 | # For more information about the recommended setup visit: 50 | # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md 51 | 52 | fastlane/report.xml 53 | fastlane/screenshots 54 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | osx_image: xcode8 2 | language: objective-c 3 | install: 4 | - gem install cocoapods -v 1.2.1 && pod repo update && pod install 5 | script: 6 | - ./test.sh 7 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Automattic Inc. 2 | 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | 24 | 25 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | platform :ios, '9.1' 3 | 4 | target 'WordPressComKit' do 5 | pod 'Alamofire', '4.4.0' 6 | 7 | target 'WordPressComKitTests' do 8 | pod 'OHHTTPStubs' 9 | pod 'OHHTTPStubs/Swift' 10 | end 11 | 12 | end 13 | 14 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Alamofire (4.4.0) 3 | - OHHTTPStubs (5.2.2): 4 | - OHHTTPStubs/Default (= 5.2.2) 5 | - OHHTTPStubs/Core (5.2.2) 6 | - OHHTTPStubs/Default (5.2.2): 7 | - OHHTTPStubs/Core 8 | - OHHTTPStubs/JSON 9 | - OHHTTPStubs/NSURLSession 10 | - OHHTTPStubs/OHPathHelpers 11 | - OHHTTPStubs/JSON (5.2.2): 12 | - OHHTTPStubs/Core 13 | - OHHTTPStubs/NSURLSession (5.2.2): 14 | - OHHTTPStubs/Core 15 | - OHHTTPStubs/OHPathHelpers (5.2.2) 16 | - OHHTTPStubs/Swift (5.2.2): 17 | - OHHTTPStubs/Core 18 | 19 | DEPENDENCIES: 20 | - Alamofire (= 4.4.0) 21 | - OHHTTPStubs 22 | - OHHTTPStubs/Swift 23 | 24 | SPEC CHECKSUMS: 25 | Alamofire: dc44b1600b800eb63da6a19039a0083d62a6a62d 26 | OHHTTPStubs: 34d9d0994e64fcf8552dbfade5ce82ada913ee31 27 | 28 | PODFILE CHECKSUM: a557694109a086e34685eb60e21acd4e51e730bb 29 | 30 | COCOAPODS: 1.2.1 31 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WordPressComKit 2 | 3 | This library will be equivalent to [wpcom.js](https://github.com/Automattic/wpcom.js) for iOS/Mac/tvOS application. There are several ideals surrounding this library: 4 | 5 | 1. Wrap all basic WordPress.com REST API functionality in a reusable, lightweight service layer. 6 | 1. Delegate persistance to consuming application. At some point in the future the caching could be heavier like in the [Parse SDKs](https://github.com/ParsePlatform/Parse-SDK-iOS-OSX). 7 | 1. Include Authentication for OAuth2 as a service. 8 | 1. Delivery as a CocoaPod or Carthage dependency. 9 | 1. Unit test everything. 10 | 11 | ## Usage 12 | 13 | Forthcoming. 14 | 15 | ## Reporting Issues 16 | 17 | Forthcoming. 18 | 19 | ## Contribution 20 | 21 | Forthcoming. 22 | 23 | -------------------------------------------------------------------------------- /WPCKitDemo/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'WPCKitDemo' do 4 | pod 'WordPressComKit', :path => '../' 5 | end 6 | 7 | -------------------------------------------------------------------------------- /WPCKitDemo/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Alamofire (3.4.0) 3 | - WordPressComKit (0.0.4): 4 | - Alamofire (~> 3.0) 5 | 6 | DEPENDENCIES: 7 | - WordPressComKit (from `../`) 8 | 9 | EXTERNAL SOURCES: 10 | WordPressComKit: 11 | :path: "../" 12 | 13 | SPEC CHECKSUMS: 14 | Alamofire: c19a627cefd6a95f840401c49ab1f124e07f54ee 15 | WordPressComKit: 0742c47e5b55bff0e6d26d40db9e010404675a73 16 | 17 | PODFILE CHECKSUM: a2b146c642c3d317d93e2621470ac1c9df32225a 18 | 19 | COCOAPODS: 1.0.1 20 | -------------------------------------------------------------------------------- /WPCKitDemo/WPCKitDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 939555891C15FD89001BC911 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 939555881C15FD89001BC911 /* AppDelegate.swift */; }; 11 | 9395558B1C15FD89001BC911 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9395558A1C15FD89001BC911 /* ViewController.swift */; }; 12 | 9395558E1C15FD89001BC911 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9395558C1C15FD89001BC911 /* Main.storyboard */; }; 13 | 939555901C15FD89001BC911 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9395558F1C15FD89001BC911 /* Assets.xcassets */; }; 14 | 939555931C15FD89001BC911 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 939555911C15FD89001BC911 /* LaunchScreen.storyboard */; }; 15 | C505E74DC689AF9EF5EEEC68 /* Pods_WPCKitDemo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F1A1FF533513DB165F307B6 /* Pods_WPCKitDemo.framework */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | 1034CD886862D1ACD6AF1B3E /* Pods-WPCKitDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WPCKitDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-WPCKitDemo/Pods-WPCKitDemo.release.xcconfig"; sourceTree = ""; }; 20 | 6F1A1FF533513DB165F307B6 /* Pods_WPCKitDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_WPCKitDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | 939555851C15FD89001BC911 /* WPCKitDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WPCKitDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | 939555881C15FD89001BC911 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 23 | 9395558A1C15FD89001BC911 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 24 | 9395558D1C15FD89001BC911 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 25 | 9395558F1C15FD89001BC911 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 26 | 939555921C15FD89001BC911 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 27 | 939555941C15FD89001BC911 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 28 | EC87CC9C776F2391B6A7E5DF /* Pods-WPCKitDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WPCKitDemo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-WPCKitDemo/Pods-WPCKitDemo.debug.xcconfig"; sourceTree = ""; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | 939555821C15FD89001BC911 /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | C505E74DC689AF9EF5EEEC68 /* Pods_WPCKitDemo.framework in Frameworks */, 37 | ); 38 | runOnlyForDeploymentPostprocessing = 0; 39 | }; 40 | /* End PBXFrameworksBuildPhase section */ 41 | 42 | /* Begin PBXGroup section */ 43 | 29C2D5565D3C87FD36CEF218 /* Pods */ = { 44 | isa = PBXGroup; 45 | children = ( 46 | EC87CC9C776F2391B6A7E5DF /* Pods-WPCKitDemo.debug.xcconfig */, 47 | 1034CD886862D1ACD6AF1B3E /* Pods-WPCKitDemo.release.xcconfig */, 48 | ); 49 | name = Pods; 50 | sourceTree = ""; 51 | }; 52 | 9395557C1C15FD89001BC911 = { 53 | isa = PBXGroup; 54 | children = ( 55 | 939555871C15FD89001BC911 /* WPCKitDemo */, 56 | 939555861C15FD89001BC911 /* Products */, 57 | 29C2D5565D3C87FD36CEF218 /* Pods */, 58 | AAB72F8AE62DC4FDBC18BBCC /* Frameworks */, 59 | ); 60 | sourceTree = ""; 61 | }; 62 | 939555861C15FD89001BC911 /* Products */ = { 63 | isa = PBXGroup; 64 | children = ( 65 | 939555851C15FD89001BC911 /* WPCKitDemo.app */, 66 | ); 67 | name = Products; 68 | sourceTree = ""; 69 | }; 70 | 939555871C15FD89001BC911 /* WPCKitDemo */ = { 71 | isa = PBXGroup; 72 | children = ( 73 | 939555881C15FD89001BC911 /* AppDelegate.swift */, 74 | 9395558A1C15FD89001BC911 /* ViewController.swift */, 75 | 9395558C1C15FD89001BC911 /* Main.storyboard */, 76 | 9395558F1C15FD89001BC911 /* Assets.xcassets */, 77 | 939555911C15FD89001BC911 /* LaunchScreen.storyboard */, 78 | 939555941C15FD89001BC911 /* Info.plist */, 79 | ); 80 | path = WPCKitDemo; 81 | sourceTree = ""; 82 | }; 83 | AAB72F8AE62DC4FDBC18BBCC /* Frameworks */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 6F1A1FF533513DB165F307B6 /* Pods_WPCKitDemo.framework */, 87 | ); 88 | name = Frameworks; 89 | sourceTree = ""; 90 | }; 91 | /* End PBXGroup section */ 92 | 93 | /* Begin PBXNativeTarget section */ 94 | 939555841C15FD89001BC911 /* WPCKitDemo */ = { 95 | isa = PBXNativeTarget; 96 | buildConfigurationList = 939555971C15FD89001BC911 /* Build configuration list for PBXNativeTarget "WPCKitDemo" */; 97 | buildPhases = ( 98 | 16A82E7CFAFFD417039D7204 /* [CP] Check Pods Manifest.lock */, 99 | 939555811C15FD89001BC911 /* Sources */, 100 | 939555821C15FD89001BC911 /* Frameworks */, 101 | 939555831C15FD89001BC911 /* Resources */, 102 | 4089DF26ECE45749B42803DE /* [CP] Embed Pods Frameworks */, 103 | D63A73D975661AE58A91772B /* [CP] Copy Pods Resources */, 104 | ); 105 | buildRules = ( 106 | ); 107 | dependencies = ( 108 | ); 109 | name = WPCKitDemo; 110 | productName = WPCKitDemo; 111 | productReference = 939555851C15FD89001BC911 /* WPCKitDemo.app */; 112 | productType = "com.apple.product-type.application"; 113 | }; 114 | /* End PBXNativeTarget section */ 115 | 116 | /* Begin PBXProject section */ 117 | 9395557D1C15FD89001BC911 /* Project object */ = { 118 | isa = PBXProject; 119 | attributes = { 120 | LastSwiftUpdateCheck = 0710; 121 | LastUpgradeCheck = 0710; 122 | ORGANIZATIONNAME = Automattic; 123 | TargetAttributes = { 124 | 939555841C15FD89001BC911 = { 125 | CreatedOnToolsVersion = 7.1.1; 126 | LastSwiftMigration = 0800; 127 | }; 128 | }; 129 | }; 130 | buildConfigurationList = 939555801C15FD89001BC911 /* Build configuration list for PBXProject "WPCKitDemo" */; 131 | compatibilityVersion = "Xcode 3.2"; 132 | developmentRegion = English; 133 | hasScannedForEncodings = 0; 134 | knownRegions = ( 135 | en, 136 | Base, 137 | ); 138 | mainGroup = 9395557C1C15FD89001BC911; 139 | productRefGroup = 939555861C15FD89001BC911 /* Products */; 140 | projectDirPath = ""; 141 | projectRoot = ""; 142 | targets = ( 143 | 939555841C15FD89001BC911 /* WPCKitDemo */, 144 | ); 145 | }; 146 | /* End PBXProject section */ 147 | 148 | /* Begin PBXResourcesBuildPhase section */ 149 | 939555831C15FD89001BC911 /* Resources */ = { 150 | isa = PBXResourcesBuildPhase; 151 | buildActionMask = 2147483647; 152 | files = ( 153 | 939555931C15FD89001BC911 /* LaunchScreen.storyboard in Resources */, 154 | 939555901C15FD89001BC911 /* Assets.xcassets in Resources */, 155 | 9395558E1C15FD89001BC911 /* Main.storyboard in Resources */, 156 | ); 157 | runOnlyForDeploymentPostprocessing = 0; 158 | }; 159 | /* End PBXResourcesBuildPhase section */ 160 | 161 | /* Begin PBXShellScriptBuildPhase section */ 162 | 16A82E7CFAFFD417039D7204 /* [CP] Check Pods Manifest.lock */ = { 163 | isa = PBXShellScriptBuildPhase; 164 | buildActionMask = 2147483647; 165 | files = ( 166 | ); 167 | inputPaths = ( 168 | ); 169 | name = "[CP] Check Pods Manifest.lock"; 170 | outputPaths = ( 171 | ); 172 | runOnlyForDeploymentPostprocessing = 0; 173 | shellPath = /bin/sh; 174 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 175 | showEnvVarsInLog = 0; 176 | }; 177 | 4089DF26ECE45749B42803DE /* [CP] Embed Pods Frameworks */ = { 178 | isa = PBXShellScriptBuildPhase; 179 | buildActionMask = 2147483647; 180 | files = ( 181 | ); 182 | inputPaths = ( 183 | ); 184 | name = "[CP] Embed Pods Frameworks"; 185 | outputPaths = ( 186 | ); 187 | runOnlyForDeploymentPostprocessing = 0; 188 | shellPath = /bin/sh; 189 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-WPCKitDemo/Pods-WPCKitDemo-frameworks.sh\"\n"; 190 | showEnvVarsInLog = 0; 191 | }; 192 | D63A73D975661AE58A91772B /* [CP] Copy Pods Resources */ = { 193 | isa = PBXShellScriptBuildPhase; 194 | buildActionMask = 2147483647; 195 | files = ( 196 | ); 197 | inputPaths = ( 198 | ); 199 | name = "[CP] Copy Pods Resources"; 200 | outputPaths = ( 201 | ); 202 | runOnlyForDeploymentPostprocessing = 0; 203 | shellPath = /bin/sh; 204 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-WPCKitDemo/Pods-WPCKitDemo-resources.sh\"\n"; 205 | showEnvVarsInLog = 0; 206 | }; 207 | /* End PBXShellScriptBuildPhase section */ 208 | 209 | /* Begin PBXSourcesBuildPhase section */ 210 | 939555811C15FD89001BC911 /* Sources */ = { 211 | isa = PBXSourcesBuildPhase; 212 | buildActionMask = 2147483647; 213 | files = ( 214 | 9395558B1C15FD89001BC911 /* ViewController.swift in Sources */, 215 | 939555891C15FD89001BC911 /* AppDelegate.swift in Sources */, 216 | ); 217 | runOnlyForDeploymentPostprocessing = 0; 218 | }; 219 | /* End PBXSourcesBuildPhase section */ 220 | 221 | /* Begin PBXVariantGroup section */ 222 | 9395558C1C15FD89001BC911 /* Main.storyboard */ = { 223 | isa = PBXVariantGroup; 224 | children = ( 225 | 9395558D1C15FD89001BC911 /* Base */, 226 | ); 227 | name = Main.storyboard; 228 | sourceTree = ""; 229 | }; 230 | 939555911C15FD89001BC911 /* LaunchScreen.storyboard */ = { 231 | isa = PBXVariantGroup; 232 | children = ( 233 | 939555921C15FD89001BC911 /* Base */, 234 | ); 235 | name = LaunchScreen.storyboard; 236 | sourceTree = ""; 237 | }; 238 | /* End PBXVariantGroup section */ 239 | 240 | /* Begin XCBuildConfiguration section */ 241 | 939555951C15FD89001BC911 /* Debug */ = { 242 | isa = XCBuildConfiguration; 243 | buildSettings = { 244 | ALWAYS_SEARCH_USER_PATHS = NO; 245 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 246 | CLANG_CXX_LIBRARY = "libc++"; 247 | CLANG_ENABLE_MODULES = YES; 248 | CLANG_ENABLE_OBJC_ARC = YES; 249 | CLANG_WARN_BOOL_CONVERSION = YES; 250 | CLANG_WARN_CONSTANT_CONVERSION = YES; 251 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 252 | CLANG_WARN_EMPTY_BODY = YES; 253 | CLANG_WARN_ENUM_CONVERSION = YES; 254 | CLANG_WARN_INT_CONVERSION = YES; 255 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 256 | CLANG_WARN_UNREACHABLE_CODE = YES; 257 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 258 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 259 | COPY_PHASE_STRIP = NO; 260 | DEBUG_INFORMATION_FORMAT = dwarf; 261 | ENABLE_STRICT_OBJC_MSGSEND = YES; 262 | ENABLE_TESTABILITY = YES; 263 | GCC_C_LANGUAGE_STANDARD = gnu99; 264 | GCC_DYNAMIC_NO_PIC = NO; 265 | GCC_NO_COMMON_BLOCKS = YES; 266 | GCC_OPTIMIZATION_LEVEL = 0; 267 | GCC_PREPROCESSOR_DEFINITIONS = ( 268 | "DEBUG=1", 269 | "$(inherited)", 270 | ); 271 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 272 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 273 | GCC_WARN_UNDECLARED_SELECTOR = YES; 274 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 275 | GCC_WARN_UNUSED_FUNCTION = YES; 276 | GCC_WARN_UNUSED_VARIABLE = YES; 277 | IPHONEOS_DEPLOYMENT_TARGET = 9.1; 278 | MTL_ENABLE_DEBUG_INFO = YES; 279 | ONLY_ACTIVE_ARCH = YES; 280 | SDKROOT = iphoneos; 281 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 282 | TARGETED_DEVICE_FAMILY = "1,2"; 283 | }; 284 | name = Debug; 285 | }; 286 | 939555961C15FD89001BC911 /* Release */ = { 287 | isa = XCBuildConfiguration; 288 | buildSettings = { 289 | ALWAYS_SEARCH_USER_PATHS = NO; 290 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 291 | CLANG_CXX_LIBRARY = "libc++"; 292 | CLANG_ENABLE_MODULES = YES; 293 | CLANG_ENABLE_OBJC_ARC = YES; 294 | CLANG_WARN_BOOL_CONVERSION = YES; 295 | CLANG_WARN_CONSTANT_CONVERSION = YES; 296 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 297 | CLANG_WARN_EMPTY_BODY = YES; 298 | CLANG_WARN_ENUM_CONVERSION = YES; 299 | CLANG_WARN_INT_CONVERSION = YES; 300 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 301 | CLANG_WARN_UNREACHABLE_CODE = YES; 302 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 303 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 304 | COPY_PHASE_STRIP = NO; 305 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 306 | ENABLE_NS_ASSERTIONS = NO; 307 | ENABLE_STRICT_OBJC_MSGSEND = YES; 308 | GCC_C_LANGUAGE_STANDARD = gnu99; 309 | GCC_NO_COMMON_BLOCKS = YES; 310 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 311 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 312 | GCC_WARN_UNDECLARED_SELECTOR = YES; 313 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 314 | GCC_WARN_UNUSED_FUNCTION = YES; 315 | GCC_WARN_UNUSED_VARIABLE = YES; 316 | IPHONEOS_DEPLOYMENT_TARGET = 9.1; 317 | MTL_ENABLE_DEBUG_INFO = NO; 318 | SDKROOT = iphoneos; 319 | TARGETED_DEVICE_FAMILY = "1,2"; 320 | VALIDATE_PRODUCT = YES; 321 | }; 322 | name = Release; 323 | }; 324 | 939555981C15FD89001BC911 /* Debug */ = { 325 | isa = XCBuildConfiguration; 326 | baseConfigurationReference = EC87CC9C776F2391B6A7E5DF /* Pods-WPCKitDemo.debug.xcconfig */; 327 | buildSettings = { 328 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 329 | INFOPLIST_FILE = WPCKitDemo/Info.plist; 330 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 331 | PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WPCKitDemo; 332 | PRODUCT_NAME = "$(TARGET_NAME)"; 333 | SWIFT_VERSION = 2.3; 334 | }; 335 | name = Debug; 336 | }; 337 | 939555991C15FD89001BC911 /* Release */ = { 338 | isa = XCBuildConfiguration; 339 | baseConfigurationReference = 1034CD886862D1ACD6AF1B3E /* Pods-WPCKitDemo.release.xcconfig */; 340 | buildSettings = { 341 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 342 | INFOPLIST_FILE = WPCKitDemo/Info.plist; 343 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 344 | PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WPCKitDemo; 345 | PRODUCT_NAME = "$(TARGET_NAME)"; 346 | SWIFT_VERSION = 2.3; 347 | }; 348 | name = Release; 349 | }; 350 | /* End XCBuildConfiguration section */ 351 | 352 | /* Begin XCConfigurationList section */ 353 | 939555801C15FD89001BC911 /* Build configuration list for PBXProject "WPCKitDemo" */ = { 354 | isa = XCConfigurationList; 355 | buildConfigurations = ( 356 | 939555951C15FD89001BC911 /* Debug */, 357 | 939555961C15FD89001BC911 /* Release */, 358 | ); 359 | defaultConfigurationIsVisible = 0; 360 | defaultConfigurationName = Release; 361 | }; 362 | 939555971C15FD89001BC911 /* Build configuration list for PBXNativeTarget "WPCKitDemo" */ = { 363 | isa = XCConfigurationList; 364 | buildConfigurations = ( 365 | 939555981C15FD89001BC911 /* Debug */, 366 | 939555991C15FD89001BC911 /* Release */, 367 | ); 368 | defaultConfigurationIsVisible = 0; 369 | defaultConfigurationName = Release; 370 | }; 371 | /* End XCConfigurationList section */ 372 | }; 373 | rootObject = 9395557D1C15FD89001BC911 /* Project object */; 374 | } 375 | -------------------------------------------------------------------------------- /WPCKitDemo/WPCKitDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WPCKitDemo/WPCKitDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /WPCKitDemo/WPCKitDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // WPCKitDemo 4 | // 5 | // Created by Aaron Douglas on 12/7/15. 6 | // Copyright © 2015 Automattic. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /WPCKitDemo/WPCKitDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /WPCKitDemo/WPCKitDemo/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /WPCKitDemo/WPCKitDemo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /WPCKitDemo/WPCKitDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /WPCKitDemo/WPCKitDemo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // WPCKitDemo 4 | // 5 | // Created by Aaron Douglas on 12/7/15. 6 | // Copyright © 2015 Automattic. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import WordPressComKit 11 | 12 | class ViewController: UIViewController { 13 | 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | // Do any additional setup after loading the view, typically from a nib. 17 | } 18 | 19 | override func didReceiveMemoryWarning() { 20 | super.didReceiveMemoryWarning() 21 | // Dispose of any resources that can be recreated. 22 | } 23 | 24 | @IBAction func doSomethingFun(sender: UIButton) { 25 | RequestRouter.bearerToken = "" 26 | 27 | let meService = MeService() 28 | meService.fetchMe { me, error in 29 | print("Me: \(me) \n\nError: \(error)") 30 | } 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /WordPressComKit.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod spec lint WordPressComKit.podspec' to ensure this is a 3 | # valid spec and to remove all comments including this before submitting the spec. 4 | # 5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html 6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | 11 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 12 | # 13 | # These will help people to find your library, and whilst it 14 | # can feel like a chore to fill in it's definitely to your advantage. The 15 | # summary should be tweet-length, and the description more in depth. 16 | # 17 | 18 | s.name = "WordPressComKit" 19 | s.version = "0.0.6" 20 | s.summary = "Quickly connect to WordPress.com and perform common actions." 21 | 22 | # This description is used to generate tags and improve search results. 23 | # * Think: What does it do? Why did you write it? What is the focus? 24 | # * Try to keep it short, snappy and to the point. 25 | # * Write the description between the DESC delimiters below. 26 | # * Finally, don't worry about the indent, CocoaPods strips it! 27 | s.description = <<-DESC 28 | A library to make working with WordPress.com easy. 29 | 30 | Related to wpcom.js. 31 | DESC 32 | 33 | s.homepage = "https://github.com/Automattic/WordPressComKit" 34 | # s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif" 35 | 36 | 37 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 38 | # 39 | # Licensing your code is important. See http://choosealicense.com for more info. 40 | # CocoaPods will detect a license file if there is a named LICENSE* 41 | # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. 42 | # 43 | 44 | s.license = "MIT" 45 | # s.license = { :type => "MIT", :file => "FILE_LICENSE" } 46 | 47 | 48 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 49 | # 50 | # Specify the authors of the library, with email addresses. Email addresses 51 | # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also 52 | # accepts just a name if you'd rather not provide an email address. 53 | # 54 | # Specify a social_media_url where others can refer to, for example a twitter 55 | # profile URL. 56 | # 57 | 58 | s.author = { "Automattic" => "mobile@automattic.com" } 59 | # Or just: s.author = "Aaron Douglas" 60 | # s.authors = { "Aaron Douglas" => "astralbodies@gmail.com" } 61 | # s.social_media_url = "http://twitter.com/Aaron Douglas" 62 | 63 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 64 | # 65 | # If this Pod runs only on iOS or OS X, then specify the platform and 66 | # the deployment target. You can optionally include the target after the platform. 67 | # 68 | 69 | # s.platform = :ios 70 | s.platform = :ios, "9.0" 71 | 72 | # When using multiple platforms 73 | # s.ios.deployment_target = "5.0" 74 | # s.osx.deployment_target = "10.7" 75 | # s.watchos.deployment_target = "2.0" 76 | # s.tvos.deployment_target = "9.0" 77 | 78 | 79 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 80 | # 81 | # Specify the location from where the source should be retrieved. 82 | # Supports git, hg, bzr, svn and HTTP. 83 | # 84 | 85 | s.source = { :git => "https://github.com/Automattic/WordPressComKit.git", :tag => "0.0.6" } 86 | 87 | 88 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 89 | # 90 | # CocoaPods is smart about how it includes source code. For source files 91 | # giving a folder will include any swift, h, m, mm, c & cpp files. 92 | # For header files it will include any header in the folder. 93 | # Not including the public_header_files will make all headers public. 94 | # 95 | 96 | s.source_files = "WordPressComKit", "WordPressComKit/**/*.{h,m}" 97 | # s.exclude_files = "Classes/Exclude" 98 | 99 | # s.public_header_files = "Classes/**/*.h" 100 | 101 | 102 | # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 103 | # 104 | # A list of resources included with the Pod. These are copied into the 105 | # target bundle with a build phase script. Anything else will be cleaned. 106 | # You can preserve files from being cleaned, please don't preserve 107 | # non-essential files like tests, examples and documentation. 108 | # 109 | 110 | # s.resource = "icon.png" 111 | # s.resources = "Resources/*.png" 112 | 113 | # s.preserve_paths = "FilesToSave", "MoreFilesToSave" 114 | 115 | 116 | # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 117 | # 118 | # Link your library with frameworks, or libraries. Libraries do not include 119 | # the lib prefix of their name. 120 | # 121 | 122 | # s.framework = "SomeFramework" 123 | # s.frameworks = "SomeFramework", "AnotherFramework" 124 | 125 | # s.library = "iconv" 126 | # s.libraries = "iconv", "xml2" 127 | 128 | 129 | # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 130 | # 131 | # If your library depends on compiler flags you can set them in the xcconfig hash 132 | # where they will only apply to your library. If you depend on other Podspecs 133 | # you can include multiple dependencies to ensure it works. 134 | 135 | # s.requires_arc = true 136 | 137 | # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } 138 | # s.dependency "JSONKit", "~> 1.4" 139 | s.dependency "Alamofire", "4.2.0" 140 | 141 | end 142 | -------------------------------------------------------------------------------- /WordPressComKit.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0974B6DB0D2E60DCA30C7334 /* Pods_WordPressComKit_WordPressComKitTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 082555B981AC6E510AC7AE8B /* Pods_WordPressComKit_WordPressComKitTests.framework */; }; 11 | 1708F2B910EB52CC4CE95AE1 /* Pods_WordPressComKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C75E2ED3F04DEA8E038E67B /* Pods_WordPressComKit.framework */; }; 12 | 93340C571C064BD8004CCB0C /* WordPressComKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 93340C561C064BD8004CCB0C /* WordPressComKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | 93340C5E1C064BD8004CCB0C /* WordPressComKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93340C531C064BD8004CCB0C /* WordPressComKit.framework */; }; 14 | 93340C701C064BEE004CCB0C /* MeService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93340C6F1C064BEE004CCB0C /* MeService.swift */; }; 15 | 93340C731C064BF7004CCB0C /* Me.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93340C711C064BF7004CCB0C /* Me.swift */; }; 16 | 93340C741C064BF7004CCB0C /* Site.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93340C721C064BF7004CCB0C /* Site.swift */; }; 17 | 93340C761C064F69004CCB0C /* PostService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93340C751C064F69004CCB0C /* PostService.swift */; }; 18 | 93340C781C064F8B004CCB0C /* SiteService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93340C771C064F8B004CCB0C /* SiteService.swift */; }; 19 | 93340C7B1C06544C004CCB0C /* MeServiceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93340C7A1C06544C004CCB0C /* MeServiceTests.swift */; }; 20 | 93340C821C0655F6004CCB0C /* me.json in Resources */ = {isa = PBXBuildFile; fileRef = 93340C811C0655F6004CCB0C /* me.json */; }; 21 | 939555631C08B73C001BC911 /* DateHelpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 939555621C08B73C001BC911 /* DateHelpers.swift */; }; 22 | 939555651C08B8AB001BC911 /* DateHelpersTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 939555641C08B8AB001BC911 /* DateHelpersTests.swift */; }; 23 | 939555671C08BC54001BC911 /* me-2.json in Resources */ = {isa = PBXBuildFile; fileRef = 939555661C08BC54001BC911 /* me-2.json */; }; 24 | 939555691C08D521001BC911 /* site.json in Resources */ = {isa = PBXBuildFile; fileRef = 939555681C08D521001BC911 /* site.json */; }; 25 | 9395556B1C08D540001BC911 /* SiteServiceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9395556A1C08D540001BC911 /* SiteServiceTests.swift */; }; 26 | 9395556D1C08DA42001BC911 /* sites.json in Resources */ = {isa = PBXBuildFile; fileRef = 9395556C1C08DA42001BC911 /* sites.json */; }; 27 | 9395556F1C08DD04001BC911 /* Post.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9395556E1C08DD04001BC911 /* Post.swift */; }; 28 | 939555711C08EC86001BC911 /* post.json in Resources */ = {isa = PBXBuildFile; fileRef = 939555701C08EC86001BC911 /* post.json */; }; 29 | 939555731C08EC99001BC911 /* post-new.json in Resources */ = {isa = PBXBuildFile; fileRef = 939555721C08EC99001BC911 /* post-new.json */; }; 30 | 939555751C08EE80001BC911 /* PostServiceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 939555741C08EE80001BC911 /* PostServiceTests.swift */; }; 31 | 939555771C08F9E9001BC911 /* AuthenticationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 939555761C08F9E9001BC911 /* AuthenticationService.swift */; }; 32 | 939555791C11E433001BC911 /* WordPressComAPIHelpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 939555781C11E433001BC911 /* WordPressComAPIHelpers.swift */; }; 33 | 9395557B1C11FC87001BC911 /* RequestRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9395557A1C11FC87001BC911 /* RequestRouter.swift */; }; 34 | B542DEC01D11D8E7004CA6AE /* media.json in Resources */ = {isa = PBXBuildFile; fileRef = B542DEBF1D11D8E7004CA6AE /* media.json */; }; 35 | B542DEC21D11D904004CA6AE /* MediaServiceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B542DEC11D11D904004CA6AE /* MediaServiceTests.swift */; }; 36 | B542DEC51D11DA49004CA6AE /* wordpress-logo.png in Resources */ = {isa = PBXBuildFile; fileRef = B542DEC41D11DA49004CA6AE /* wordpress-logo.png */; }; 37 | B58E12581D2C480C00E14ACE /* Alamofire+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B58E12571D2C480C00E14ACE /* Alamofire+Extensions.swift */; }; 38 | B5CD5CFA1D0B3B9A00C6BD26 /* MediaService.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5CD5CF91D0B3B9A00C6BD26 /* MediaService.swift */; }; 39 | B5CD5CFC1D0B3EC300C6BD26 /* Media.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5CD5CFB1D0B3EC300C6BD26 /* Media.swift */; }; 40 | /* End PBXBuildFile section */ 41 | 42 | /* Begin PBXContainerItemProxy section */ 43 | 93340C5F1C064BD8004CCB0C /* PBXContainerItemProxy */ = { 44 | isa = PBXContainerItemProxy; 45 | containerPortal = 93340C4A1C064BD8004CCB0C /* Project object */; 46 | proxyType = 1; 47 | remoteGlobalIDString = 93340C521C064BD8004CCB0C; 48 | remoteInfo = WordPressComKit; 49 | }; 50 | /* End PBXContainerItemProxy section */ 51 | 52 | /* Begin PBXFileReference section */ 53 | 016A23251B4C347F777AE3E9 /* Pods-WordPressComKit-WordPressComKitTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WordPressComKit-WordPressComKitTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-WordPressComKit-WordPressComKitTests/Pods-WordPressComKit-WordPressComKitTests.release.xcconfig"; sourceTree = ""; }; 54 | 082555B981AC6E510AC7AE8B /* Pods_WordPressComKit_WordPressComKitTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_WordPressComKit_WordPressComKitTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 55 | 11AAFD125FB2AD7729101BDB /* Pods-WordPressComKit-WordPressComKitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WordPressComKit-WordPressComKitTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-WordPressComKit-WordPressComKitTests/Pods-WordPressComKit-WordPressComKitTests.debug.xcconfig"; sourceTree = ""; }; 56 | 127C0E33D08C205F22BA122A /* Pods-WordPressComKit.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WordPressComKit.release.xcconfig"; path = "Pods/Target Support Files/Pods-WordPressComKit/Pods-WordPressComKit.release.xcconfig"; sourceTree = ""; }; 57 | 5C75E2ED3F04DEA8E038E67B /* Pods_WordPressComKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_WordPressComKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 58 | 640DFB4ECB68DD096E51EBFF /* Pods-WordPressComKit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WordPressComKit.debug.xcconfig"; path = "Pods/Target Support Files/Pods-WordPressComKit/Pods-WordPressComKit.debug.xcconfig"; sourceTree = ""; }; 59 | 93340C531C064BD8004CCB0C /* WordPressComKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = WordPressComKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 60 | 93340C561C064BD8004CCB0C /* WordPressComKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WordPressComKit.h; sourceTree = ""; }; 61 | 93340C581C064BD8004CCB0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 62 | 93340C5D1C064BD8004CCB0C /* WordPressComKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WordPressComKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 63 | 93340C641C064BD8004CCB0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 64 | 93340C6F1C064BEE004CCB0C /* MeService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MeService.swift; sourceTree = ""; }; 65 | 93340C711C064BF7004CCB0C /* Me.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Me.swift; sourceTree = ""; }; 66 | 93340C721C064BF7004CCB0C /* Site.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Site.swift; sourceTree = ""; }; 67 | 93340C751C064F69004CCB0C /* PostService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PostService.swift; sourceTree = ""; }; 68 | 93340C771C064F8B004CCB0C /* SiteService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SiteService.swift; sourceTree = ""; }; 69 | 93340C7A1C06544C004CCB0C /* MeServiceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MeServiceTests.swift; sourceTree = ""; }; 70 | 93340C811C0655F6004CCB0C /* me.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = me.json; sourceTree = ""; }; 71 | 939555621C08B73C001BC911 /* DateHelpers.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DateHelpers.swift; sourceTree = ""; }; 72 | 939555641C08B8AB001BC911 /* DateHelpersTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DateHelpersTests.swift; sourceTree = ""; }; 73 | 939555661C08BC54001BC911 /* me-2.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "me-2.json"; sourceTree = ""; }; 74 | 939555681C08D521001BC911 /* site.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = site.json; sourceTree = ""; }; 75 | 9395556A1C08D540001BC911 /* SiteServiceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SiteServiceTests.swift; sourceTree = ""; }; 76 | 9395556C1C08DA42001BC911 /* sites.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = sites.json; sourceTree = ""; }; 77 | 9395556E1C08DD04001BC911 /* Post.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Post.swift; sourceTree = ""; }; 78 | 939555701C08EC86001BC911 /* post.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = post.json; sourceTree = ""; }; 79 | 939555721C08EC99001BC911 /* post-new.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "post-new.json"; sourceTree = ""; }; 80 | 939555741C08EE80001BC911 /* PostServiceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PostServiceTests.swift; sourceTree = ""; }; 81 | 939555761C08F9E9001BC911 /* AuthenticationService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AuthenticationService.swift; sourceTree = ""; }; 82 | 939555781C11E433001BC911 /* WordPressComAPIHelpers.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WordPressComAPIHelpers.swift; sourceTree = ""; }; 83 | 9395557A1C11FC87001BC911 /* RequestRouter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RequestRouter.swift; sourceTree = ""; }; 84 | B542DEBF1D11D8E7004CA6AE /* media.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = media.json; sourceTree = ""; }; 85 | B542DEC11D11D904004CA6AE /* MediaServiceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MediaServiceTests.swift; sourceTree = ""; }; 86 | B542DEC41D11DA49004CA6AE /* wordpress-logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "wordpress-logo.png"; sourceTree = ""; }; 87 | B58E12571D2C480C00E14ACE /* Alamofire+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Alamofire+Extensions.swift"; sourceTree = ""; }; 88 | B5CD5CF91D0B3B9A00C6BD26 /* MediaService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MediaService.swift; sourceTree = ""; }; 89 | B5CD5CFB1D0B3EC300C6BD26 /* Media.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Media.swift; sourceTree = ""; }; 90 | /* End PBXFileReference section */ 91 | 92 | /* Begin PBXFrameworksBuildPhase section */ 93 | 93340C4F1C064BD8004CCB0C /* Frameworks */ = { 94 | isa = PBXFrameworksBuildPhase; 95 | buildActionMask = 2147483647; 96 | files = ( 97 | 1708F2B910EB52CC4CE95AE1 /* Pods_WordPressComKit.framework in Frameworks */, 98 | ); 99 | runOnlyForDeploymentPostprocessing = 0; 100 | }; 101 | 93340C5A1C064BD8004CCB0C /* Frameworks */ = { 102 | isa = PBXFrameworksBuildPhase; 103 | buildActionMask = 2147483647; 104 | files = ( 105 | 93340C5E1C064BD8004CCB0C /* WordPressComKit.framework in Frameworks */, 106 | 0974B6DB0D2E60DCA30C7334 /* Pods_WordPressComKit_WordPressComKitTests.framework in Frameworks */, 107 | ); 108 | runOnlyForDeploymentPostprocessing = 0; 109 | }; 110 | /* End PBXFrameworksBuildPhase section */ 111 | 112 | /* Begin PBXGroup section */ 113 | 0A18D107A97FDDE3DD6F0980 /* Frameworks */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 5C75E2ED3F04DEA8E038E67B /* Pods_WordPressComKit.framework */, 117 | 082555B981AC6E510AC7AE8B /* Pods_WordPressComKit_WordPressComKitTests.framework */, 118 | ); 119 | name = Frameworks; 120 | sourceTree = ""; 121 | }; 122 | 93340C491C064BD8004CCB0C = { 123 | isa = PBXGroup; 124 | children = ( 125 | 93340C551C064BD8004CCB0C /* WordPressComKit */, 126 | 93340C611C064BD8004CCB0C /* WordPressComKitTests */, 127 | 93340C541C064BD8004CCB0C /* Products */, 128 | A0CC720A145A4A24A7071750 /* Pods */, 129 | 0A18D107A97FDDE3DD6F0980 /* Frameworks */, 130 | ); 131 | sourceTree = ""; 132 | }; 133 | 93340C541C064BD8004CCB0C /* Products */ = { 134 | isa = PBXGroup; 135 | children = ( 136 | 93340C531C064BD8004CCB0C /* WordPressComKit.framework */, 137 | 93340C5D1C064BD8004CCB0C /* WordPressComKitTests.xctest */, 138 | ); 139 | name = Products; 140 | sourceTree = ""; 141 | }; 142 | 93340C551C064BD8004CCB0C /* WordPressComKit */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | B58E12591D2C481600E14ACE /* Extensions */, 146 | 93340C6E1C064BE7004CCB0C /* Model */, 147 | 93340C6D1C064BDE004CCB0C /* Services */, 148 | 93340C561C064BD8004CCB0C /* WordPressComKit.h */, 149 | 93340C581C064BD8004CCB0C /* Info.plist */, 150 | ); 151 | path = WordPressComKit; 152 | sourceTree = ""; 153 | }; 154 | 93340C611C064BD8004CCB0C /* WordPressComKitTests */ = { 155 | isa = PBXGroup; 156 | children = ( 157 | B542DEC31D11DA49004CA6AE /* Test Assets */, 158 | 93340C801C0655DB004CCB0C /* Test Data */, 159 | 93340C791C065436004CCB0C /* Tests */, 160 | 93340C641C064BD8004CCB0C /* Info.plist */, 161 | ); 162 | path = WordPressComKitTests; 163 | sourceTree = ""; 164 | }; 165 | 93340C6D1C064BDE004CCB0C /* Services */ = { 166 | isa = PBXGroup; 167 | children = ( 168 | 939555611C08B728001BC911 /* Helpers */, 169 | 93340C6F1C064BEE004CCB0C /* MeService.swift */, 170 | B5CD5CF91D0B3B9A00C6BD26 /* MediaService.swift */, 171 | 93340C751C064F69004CCB0C /* PostService.swift */, 172 | 93340C771C064F8B004CCB0C /* SiteService.swift */, 173 | 939555761C08F9E9001BC911 /* AuthenticationService.swift */, 174 | 9395557A1C11FC87001BC911 /* RequestRouter.swift */, 175 | ); 176 | name = Services; 177 | sourceTree = ""; 178 | }; 179 | 93340C6E1C064BE7004CCB0C /* Model */ = { 180 | isa = PBXGroup; 181 | children = ( 182 | 93340C711C064BF7004CCB0C /* Me.swift */, 183 | 9395556E1C08DD04001BC911 /* Post.swift */, 184 | 93340C721C064BF7004CCB0C /* Site.swift */, 185 | B5CD5CFB1D0B3EC300C6BD26 /* Media.swift */, 186 | ); 187 | name = Model; 188 | sourceTree = ""; 189 | }; 190 | 93340C791C065436004CCB0C /* Tests */ = { 191 | isa = PBXGroup; 192 | children = ( 193 | 939555641C08B8AB001BC911 /* DateHelpersTests.swift */, 194 | 93340C7A1C06544C004CCB0C /* MeServiceTests.swift */, 195 | 939555741C08EE80001BC911 /* PostServiceTests.swift */, 196 | 9395556A1C08D540001BC911 /* SiteServiceTests.swift */, 197 | B542DEC11D11D904004CA6AE /* MediaServiceTests.swift */, 198 | ); 199 | name = Tests; 200 | sourceTree = ""; 201 | }; 202 | 93340C801C0655DB004CCB0C /* Test Data */ = { 203 | isa = PBXGroup; 204 | children = ( 205 | 93340C811C0655F6004CCB0C /* me.json */, 206 | 939555661C08BC54001BC911 /* me-2.json */, 207 | 939555681C08D521001BC911 /* site.json */, 208 | 9395556C1C08DA42001BC911 /* sites.json */, 209 | 939555701C08EC86001BC911 /* post.json */, 210 | 939555721C08EC99001BC911 /* post-new.json */, 211 | B542DEBF1D11D8E7004CA6AE /* media.json */, 212 | ); 213 | path = "Test Data"; 214 | sourceTree = ""; 215 | }; 216 | 939555611C08B728001BC911 /* Helpers */ = { 217 | isa = PBXGroup; 218 | children = ( 219 | 939555621C08B73C001BC911 /* DateHelpers.swift */, 220 | 939555781C11E433001BC911 /* WordPressComAPIHelpers.swift */, 221 | ); 222 | name = Helpers; 223 | sourceTree = ""; 224 | }; 225 | A0CC720A145A4A24A7071750 /* Pods */ = { 226 | isa = PBXGroup; 227 | children = ( 228 | 640DFB4ECB68DD096E51EBFF /* Pods-WordPressComKit.debug.xcconfig */, 229 | 127C0E33D08C205F22BA122A /* Pods-WordPressComKit.release.xcconfig */, 230 | 11AAFD125FB2AD7729101BDB /* Pods-WordPressComKit-WordPressComKitTests.debug.xcconfig */, 231 | 016A23251B4C347F777AE3E9 /* Pods-WordPressComKit-WordPressComKitTests.release.xcconfig */, 232 | ); 233 | name = Pods; 234 | sourceTree = ""; 235 | }; 236 | B542DEC31D11DA49004CA6AE /* Test Assets */ = { 237 | isa = PBXGroup; 238 | children = ( 239 | B542DEC41D11DA49004CA6AE /* wordpress-logo.png */, 240 | ); 241 | path = "Test Assets"; 242 | sourceTree = ""; 243 | }; 244 | B58E12591D2C481600E14ACE /* Extensions */ = { 245 | isa = PBXGroup; 246 | children = ( 247 | B58E12571D2C480C00E14ACE /* Alamofire+Extensions.swift */, 248 | ); 249 | name = Extensions; 250 | sourceTree = ""; 251 | }; 252 | /* End PBXGroup section */ 253 | 254 | /* Begin PBXHeadersBuildPhase section */ 255 | 93340C501C064BD8004CCB0C /* Headers */ = { 256 | isa = PBXHeadersBuildPhase; 257 | buildActionMask = 2147483647; 258 | files = ( 259 | 93340C571C064BD8004CCB0C /* WordPressComKit.h in Headers */, 260 | ); 261 | runOnlyForDeploymentPostprocessing = 0; 262 | }; 263 | /* End PBXHeadersBuildPhase section */ 264 | 265 | /* Begin PBXNativeTarget section */ 266 | 93340C521C064BD8004CCB0C /* WordPressComKit */ = { 267 | isa = PBXNativeTarget; 268 | buildConfigurationList = 93340C671C064BD8004CCB0C /* Build configuration list for PBXNativeTarget "WordPressComKit" */; 269 | buildPhases = ( 270 | 4AF245D5BCA49CB4AE679C04 /* [CP] Check Pods Manifest.lock */, 271 | ACD569C284F96BD854D54515 /* [CP] Check Pods Manifest.lock */, 272 | 93340C4E1C064BD8004CCB0C /* Sources */, 273 | 93340C4F1C064BD8004CCB0C /* Frameworks */, 274 | 93340C501C064BD8004CCB0C /* Headers */, 275 | 93340C511C064BD8004CCB0C /* Resources */, 276 | E414949DE8FD3B4B419062A8 /* [CP] Copy Pods Resources */, 277 | 9E5EF98E3FABCA8CE7D4974A /* 📦 Copy Pods Resources */, 278 | ); 279 | buildRules = ( 280 | ); 281 | dependencies = ( 282 | ); 283 | name = WordPressComKit; 284 | productName = WordPressComKit; 285 | productReference = 93340C531C064BD8004CCB0C /* WordPressComKit.framework */; 286 | productType = "com.apple.product-type.framework"; 287 | }; 288 | 93340C5C1C064BD8004CCB0C /* WordPressComKitTests */ = { 289 | isa = PBXNativeTarget; 290 | buildConfigurationList = 93340C6A1C064BD8004CCB0C /* Build configuration list for PBXNativeTarget "WordPressComKitTests" */; 291 | buildPhases = ( 292 | A37A6FB930DEC31CB32B5592 /* [CP] Check Pods Manifest.lock */, 293 | 307C6853530FA6F2673E5288 /* [CP] Check Pods Manifest.lock */, 294 | 93340C591C064BD8004CCB0C /* Sources */, 295 | 93340C5A1C064BD8004CCB0C /* Frameworks */, 296 | 93340C5B1C064BD8004CCB0C /* Resources */, 297 | 07F41A0C1E481BB48A44BD32 /* [CP] Embed Pods Frameworks */, 298 | F08A25D94078394668CCFFE7 /* [CP] Copy Pods Resources */, 299 | 2ADE74835320F588C24F765A /* 📦 Embed Pods Frameworks */, 300 | FB4D57FBB5DD3D59EF522F24 /* 📦 Copy Pods Resources */, 301 | ); 302 | buildRules = ( 303 | ); 304 | dependencies = ( 305 | 93340C601C064BD8004CCB0C /* PBXTargetDependency */, 306 | ); 307 | name = WordPressComKitTests; 308 | productName = WordPressComKitTests; 309 | productReference = 93340C5D1C064BD8004CCB0C /* WordPressComKitTests.xctest */; 310 | productType = "com.apple.product-type.bundle.unit-test"; 311 | }; 312 | /* End PBXNativeTarget section */ 313 | 314 | /* Begin PBXProject section */ 315 | 93340C4A1C064BD8004CCB0C /* Project object */ = { 316 | isa = PBXProject; 317 | attributes = { 318 | LastSwiftUpdateCheck = 0710; 319 | LastUpgradeCheck = 0900; 320 | ORGANIZATIONNAME = Automattic; 321 | TargetAttributes = { 322 | 93340C521C064BD8004CCB0C = { 323 | CreatedOnToolsVersion = 7.1.1; 324 | LastSwiftMigration = 0820; 325 | }; 326 | 93340C5C1C064BD8004CCB0C = { 327 | CreatedOnToolsVersion = 7.1.1; 328 | LastSwiftMigration = 0820; 329 | }; 330 | }; 331 | }; 332 | buildConfigurationList = 93340C4D1C064BD8004CCB0C /* Build configuration list for PBXProject "WordPressComKit" */; 333 | compatibilityVersion = "Xcode 3.2"; 334 | developmentRegion = English; 335 | hasScannedForEncodings = 0; 336 | knownRegions = ( 337 | en, 338 | ); 339 | mainGroup = 93340C491C064BD8004CCB0C; 340 | productRefGroup = 93340C541C064BD8004CCB0C /* Products */; 341 | projectDirPath = ""; 342 | projectRoot = ""; 343 | targets = ( 344 | 93340C521C064BD8004CCB0C /* WordPressComKit */, 345 | 93340C5C1C064BD8004CCB0C /* WordPressComKitTests */, 346 | ); 347 | }; 348 | /* End PBXProject section */ 349 | 350 | /* Begin PBXResourcesBuildPhase section */ 351 | 93340C511C064BD8004CCB0C /* Resources */ = { 352 | isa = PBXResourcesBuildPhase; 353 | buildActionMask = 2147483647; 354 | files = ( 355 | ); 356 | runOnlyForDeploymentPostprocessing = 0; 357 | }; 358 | 93340C5B1C064BD8004CCB0C /* Resources */ = { 359 | isa = PBXResourcesBuildPhase; 360 | buildActionMask = 2147483647; 361 | files = ( 362 | 939555731C08EC99001BC911 /* post-new.json in Resources */, 363 | 939555711C08EC86001BC911 /* post.json in Resources */, 364 | 939555671C08BC54001BC911 /* me-2.json in Resources */, 365 | B542DEC01D11D8E7004CA6AE /* media.json in Resources */, 366 | B542DEC51D11DA49004CA6AE /* wordpress-logo.png in Resources */, 367 | 939555691C08D521001BC911 /* site.json in Resources */, 368 | 9395556D1C08DA42001BC911 /* sites.json in Resources */, 369 | 93340C821C0655F6004CCB0C /* me.json in Resources */, 370 | ); 371 | runOnlyForDeploymentPostprocessing = 0; 372 | }; 373 | /* End PBXResourcesBuildPhase section */ 374 | 375 | /* Begin PBXShellScriptBuildPhase section */ 376 | 07F41A0C1E481BB48A44BD32 /* [CP] Embed Pods Frameworks */ = { 377 | isa = PBXShellScriptBuildPhase; 378 | buildActionMask = 2147483647; 379 | files = ( 380 | ); 381 | inputPaths = ( 382 | ); 383 | name = "[CP] Embed Pods Frameworks"; 384 | outputPaths = ( 385 | ); 386 | runOnlyForDeploymentPostprocessing = 0; 387 | shellPath = /bin/sh; 388 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-WordPressComKit-WordPressComKitTests/Pods-WordPressComKit-WordPressComKitTests-frameworks.sh\"\n"; 389 | showEnvVarsInLog = 0; 390 | }; 391 | 2ADE74835320F588C24F765A /* 📦 Embed Pods Frameworks */ = { 392 | isa = PBXShellScriptBuildPhase; 393 | buildActionMask = 2147483647; 394 | files = ( 395 | ); 396 | inputPaths = ( 397 | ); 398 | name = "📦 Embed Pods Frameworks"; 399 | outputPaths = ( 400 | ); 401 | runOnlyForDeploymentPostprocessing = 0; 402 | shellPath = /bin/sh; 403 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-WordPressComKit-WordPressComKitTests/Pods-WordPressComKit-WordPressComKitTests-frameworks.sh\"\n"; 404 | showEnvVarsInLog = 0; 405 | }; 406 | 307C6853530FA6F2673E5288 /* [CP] Check Pods Manifest.lock */ = { 407 | isa = PBXShellScriptBuildPhase; 408 | buildActionMask = 2147483647; 409 | files = ( 410 | ); 411 | inputPaths = ( 412 | ); 413 | name = "[CP] Check Pods Manifest.lock"; 414 | outputPaths = ( 415 | ); 416 | runOnlyForDeploymentPostprocessing = 0; 417 | shellPath = /bin/sh; 418 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 419 | showEnvVarsInLog = 0; 420 | }; 421 | 4AF245D5BCA49CB4AE679C04 /* [CP] Check Pods Manifest.lock */ = { 422 | isa = PBXShellScriptBuildPhase; 423 | buildActionMask = 2147483647; 424 | files = ( 425 | ); 426 | inputPaths = ( 427 | ); 428 | name = "[CP] Check Pods Manifest.lock"; 429 | outputPaths = ( 430 | ); 431 | runOnlyForDeploymentPostprocessing = 0; 432 | shellPath = /bin/sh; 433 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 434 | showEnvVarsInLog = 0; 435 | }; 436 | 9E5EF98E3FABCA8CE7D4974A /* 📦 Copy Pods Resources */ = { 437 | isa = PBXShellScriptBuildPhase; 438 | buildActionMask = 2147483647; 439 | files = ( 440 | ); 441 | inputPaths = ( 442 | ); 443 | name = "📦 Copy Pods Resources"; 444 | outputPaths = ( 445 | ); 446 | runOnlyForDeploymentPostprocessing = 0; 447 | shellPath = /bin/sh; 448 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-WordPressComKit/Pods-WordPressComKit-resources.sh\"\n"; 449 | showEnvVarsInLog = 0; 450 | }; 451 | A37A6FB930DEC31CB32B5592 /* [CP] Check Pods Manifest.lock */ = { 452 | isa = PBXShellScriptBuildPhase; 453 | buildActionMask = 2147483647; 454 | files = ( 455 | ); 456 | inputPaths = ( 457 | ); 458 | name = "[CP] Check Pods Manifest.lock"; 459 | outputPaths = ( 460 | ); 461 | runOnlyForDeploymentPostprocessing = 0; 462 | shellPath = /bin/sh; 463 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 464 | showEnvVarsInLog = 0; 465 | }; 466 | ACD569C284F96BD854D54515 /* [CP] Check Pods Manifest.lock */ = { 467 | isa = PBXShellScriptBuildPhase; 468 | buildActionMask = 2147483647; 469 | files = ( 470 | ); 471 | inputPaths = ( 472 | ); 473 | name = "[CP] Check Pods Manifest.lock"; 474 | outputPaths = ( 475 | ); 476 | runOnlyForDeploymentPostprocessing = 0; 477 | shellPath = /bin/sh; 478 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 479 | showEnvVarsInLog = 0; 480 | }; 481 | E414949DE8FD3B4B419062A8 /* [CP] Copy Pods Resources */ = { 482 | isa = PBXShellScriptBuildPhase; 483 | buildActionMask = 2147483647; 484 | files = ( 485 | ); 486 | inputPaths = ( 487 | ); 488 | name = "[CP] Copy Pods Resources"; 489 | outputPaths = ( 490 | ); 491 | runOnlyForDeploymentPostprocessing = 0; 492 | shellPath = /bin/sh; 493 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-WordPressComKit/Pods-WordPressComKit-resources.sh\"\n"; 494 | showEnvVarsInLog = 0; 495 | }; 496 | F08A25D94078394668CCFFE7 /* [CP] Copy Pods Resources */ = { 497 | isa = PBXShellScriptBuildPhase; 498 | buildActionMask = 2147483647; 499 | files = ( 500 | ); 501 | inputPaths = ( 502 | ); 503 | name = "[CP] Copy Pods Resources"; 504 | outputPaths = ( 505 | ); 506 | runOnlyForDeploymentPostprocessing = 0; 507 | shellPath = /bin/sh; 508 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-WordPressComKit-WordPressComKitTests/Pods-WordPressComKit-WordPressComKitTests-resources.sh\"\n"; 509 | showEnvVarsInLog = 0; 510 | }; 511 | FB4D57FBB5DD3D59EF522F24 /* 📦 Copy Pods Resources */ = { 512 | isa = PBXShellScriptBuildPhase; 513 | buildActionMask = 2147483647; 514 | files = ( 515 | ); 516 | inputPaths = ( 517 | ); 518 | name = "📦 Copy Pods Resources"; 519 | outputPaths = ( 520 | ); 521 | runOnlyForDeploymentPostprocessing = 0; 522 | shellPath = /bin/sh; 523 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-WordPressComKit-WordPressComKitTests/Pods-WordPressComKit-WordPressComKitTests-resources.sh\"\n"; 524 | showEnvVarsInLog = 0; 525 | }; 526 | /* End PBXShellScriptBuildPhase section */ 527 | 528 | /* Begin PBXSourcesBuildPhase section */ 529 | 93340C4E1C064BD8004CCB0C /* Sources */ = { 530 | isa = PBXSourcesBuildPhase; 531 | buildActionMask = 2147483647; 532 | files = ( 533 | 93340C701C064BEE004CCB0C /* MeService.swift in Sources */, 534 | 93340C741C064BF7004CCB0C /* Site.swift in Sources */, 535 | B5CD5CFC1D0B3EC300C6BD26 /* Media.swift in Sources */, 536 | 939555791C11E433001BC911 /* WordPressComAPIHelpers.swift in Sources */, 537 | 93340C781C064F8B004CCB0C /* SiteService.swift in Sources */, 538 | 93340C731C064BF7004CCB0C /* Me.swift in Sources */, 539 | 93340C761C064F69004CCB0C /* PostService.swift in Sources */, 540 | B58E12581D2C480C00E14ACE /* Alamofire+Extensions.swift in Sources */, 541 | 9395557B1C11FC87001BC911 /* RequestRouter.swift in Sources */, 542 | 9395556F1C08DD04001BC911 /* Post.swift in Sources */, 543 | 939555631C08B73C001BC911 /* DateHelpers.swift in Sources */, 544 | B5CD5CFA1D0B3B9A00C6BD26 /* MediaService.swift in Sources */, 545 | 939555771C08F9E9001BC911 /* AuthenticationService.swift in Sources */, 546 | ); 547 | runOnlyForDeploymentPostprocessing = 0; 548 | }; 549 | 93340C591C064BD8004CCB0C /* Sources */ = { 550 | isa = PBXSourcesBuildPhase; 551 | buildActionMask = 2147483647; 552 | files = ( 553 | 93340C7B1C06544C004CCB0C /* MeServiceTests.swift in Sources */, 554 | 939555751C08EE80001BC911 /* PostServiceTests.swift in Sources */, 555 | B542DEC21D11D904004CA6AE /* MediaServiceTests.swift in Sources */, 556 | 939555651C08B8AB001BC911 /* DateHelpersTests.swift in Sources */, 557 | 9395556B1C08D540001BC911 /* SiteServiceTests.swift in Sources */, 558 | ); 559 | runOnlyForDeploymentPostprocessing = 0; 560 | }; 561 | /* End PBXSourcesBuildPhase section */ 562 | 563 | /* Begin PBXTargetDependency section */ 564 | 93340C601C064BD8004CCB0C /* PBXTargetDependency */ = { 565 | isa = PBXTargetDependency; 566 | target = 93340C521C064BD8004CCB0C /* WordPressComKit */; 567 | targetProxy = 93340C5F1C064BD8004CCB0C /* PBXContainerItemProxy */; 568 | }; 569 | /* End PBXTargetDependency section */ 570 | 571 | /* Begin XCBuildConfiguration section */ 572 | 93340C651C064BD8004CCB0C /* Debug */ = { 573 | isa = XCBuildConfiguration; 574 | buildSettings = { 575 | ALWAYS_SEARCH_USER_PATHS = NO; 576 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 577 | CLANG_CXX_LIBRARY = "libc++"; 578 | CLANG_ENABLE_MODULES = YES; 579 | CLANG_ENABLE_OBJC_ARC = YES; 580 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 581 | CLANG_WARN_BOOL_CONVERSION = YES; 582 | CLANG_WARN_COMMA = YES; 583 | CLANG_WARN_CONSTANT_CONVERSION = YES; 584 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 585 | CLANG_WARN_EMPTY_BODY = YES; 586 | CLANG_WARN_ENUM_CONVERSION = YES; 587 | CLANG_WARN_INFINITE_RECURSION = YES; 588 | CLANG_WARN_INT_CONVERSION = YES; 589 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 590 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 591 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 592 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 593 | CLANG_WARN_STRICT_PROTOTYPES = YES; 594 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 595 | CLANG_WARN_UNREACHABLE_CODE = YES; 596 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 597 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 598 | COPY_PHASE_STRIP = NO; 599 | CURRENT_PROJECT_VERSION = 1; 600 | DEBUG_INFORMATION_FORMAT = dwarf; 601 | ENABLE_STRICT_OBJC_MSGSEND = YES; 602 | ENABLE_TESTABILITY = YES; 603 | GCC_C_LANGUAGE_STANDARD = gnu99; 604 | GCC_DYNAMIC_NO_PIC = NO; 605 | GCC_NO_COMMON_BLOCKS = YES; 606 | GCC_OPTIMIZATION_LEVEL = 0; 607 | GCC_PREPROCESSOR_DEFINITIONS = ( 608 | "DEBUG=1", 609 | "$(inherited)", 610 | ); 611 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 612 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 613 | GCC_WARN_UNDECLARED_SELECTOR = YES; 614 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 615 | GCC_WARN_UNUSED_FUNCTION = YES; 616 | GCC_WARN_UNUSED_VARIABLE = YES; 617 | IPHONEOS_DEPLOYMENT_TARGET = 9.1; 618 | MTL_ENABLE_DEBUG_INFO = YES; 619 | ONLY_ACTIVE_ARCH = YES; 620 | SDKROOT = iphoneos; 621 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 622 | SWIFT_VERSION = 3.0; 623 | TARGETED_DEVICE_FAMILY = "1,2"; 624 | VERSIONING_SYSTEM = "apple-generic"; 625 | VERSION_INFO_PREFIX = ""; 626 | }; 627 | name = Debug; 628 | }; 629 | 93340C661C064BD8004CCB0C /* Release */ = { 630 | isa = XCBuildConfiguration; 631 | buildSettings = { 632 | ALWAYS_SEARCH_USER_PATHS = NO; 633 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 634 | CLANG_CXX_LIBRARY = "libc++"; 635 | CLANG_ENABLE_MODULES = YES; 636 | CLANG_ENABLE_OBJC_ARC = YES; 637 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 638 | CLANG_WARN_BOOL_CONVERSION = YES; 639 | CLANG_WARN_COMMA = YES; 640 | CLANG_WARN_CONSTANT_CONVERSION = YES; 641 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 642 | CLANG_WARN_EMPTY_BODY = YES; 643 | CLANG_WARN_ENUM_CONVERSION = YES; 644 | CLANG_WARN_INFINITE_RECURSION = YES; 645 | CLANG_WARN_INT_CONVERSION = YES; 646 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 647 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 648 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 649 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 650 | CLANG_WARN_STRICT_PROTOTYPES = YES; 651 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 652 | CLANG_WARN_UNREACHABLE_CODE = YES; 653 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 654 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 655 | COPY_PHASE_STRIP = NO; 656 | CURRENT_PROJECT_VERSION = 1; 657 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 658 | ENABLE_NS_ASSERTIONS = NO; 659 | ENABLE_STRICT_OBJC_MSGSEND = YES; 660 | GCC_C_LANGUAGE_STANDARD = gnu99; 661 | GCC_NO_COMMON_BLOCKS = YES; 662 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 663 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 664 | GCC_WARN_UNDECLARED_SELECTOR = YES; 665 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 666 | GCC_WARN_UNUSED_FUNCTION = YES; 667 | GCC_WARN_UNUSED_VARIABLE = YES; 668 | IPHONEOS_DEPLOYMENT_TARGET = 9.1; 669 | MTL_ENABLE_DEBUG_INFO = NO; 670 | SDKROOT = iphoneos; 671 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 672 | SWIFT_VERSION = 3.0; 673 | TARGETED_DEVICE_FAMILY = "1,2"; 674 | VALIDATE_PRODUCT = YES; 675 | VERSIONING_SYSTEM = "apple-generic"; 676 | VERSION_INFO_PREFIX = ""; 677 | }; 678 | name = Release; 679 | }; 680 | 93340C681C064BD8004CCB0C /* Debug */ = { 681 | isa = XCBuildConfiguration; 682 | baseConfigurationReference = 640DFB4ECB68DD096E51EBFF /* Pods-WordPressComKit.debug.xcconfig */; 683 | buildSettings = { 684 | CLANG_ENABLE_MODULES = YES; 685 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 686 | DEFINES_MODULE = YES; 687 | DYLIB_COMPATIBILITY_VERSION = 1; 688 | DYLIB_CURRENT_VERSION = 1; 689 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 690 | INFOPLIST_FILE = WordPressComKit/Info.plist; 691 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 692 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 693 | PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressComKit; 694 | PRODUCT_NAME = "$(TARGET_NAME)"; 695 | SKIP_INSTALL = YES; 696 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 697 | SWIFT_VERSION = 3.0; 698 | }; 699 | name = Debug; 700 | }; 701 | 93340C691C064BD8004CCB0C /* Release */ = { 702 | isa = XCBuildConfiguration; 703 | baseConfigurationReference = 127C0E33D08C205F22BA122A /* Pods-WordPressComKit.release.xcconfig */; 704 | buildSettings = { 705 | CLANG_ENABLE_MODULES = YES; 706 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 707 | DEFINES_MODULE = YES; 708 | DYLIB_COMPATIBILITY_VERSION = 1; 709 | DYLIB_CURRENT_VERSION = 1; 710 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 711 | INFOPLIST_FILE = WordPressComKit/Info.plist; 712 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 713 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 714 | PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressComKit; 715 | PRODUCT_NAME = "$(TARGET_NAME)"; 716 | SKIP_INSTALL = YES; 717 | SWIFT_VERSION = 3.0; 718 | }; 719 | name = Release; 720 | }; 721 | 93340C6B1C064BD8004CCB0C /* Debug */ = { 722 | isa = XCBuildConfiguration; 723 | baseConfigurationReference = 11AAFD125FB2AD7729101BDB /* Pods-WordPressComKit-WordPressComKitTests.debug.xcconfig */; 724 | buildSettings = { 725 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; 726 | INFOPLIST_FILE = WordPressComKitTests/Info.plist; 727 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 728 | PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressComKitTests; 729 | PRODUCT_NAME = "$(TARGET_NAME)"; 730 | SWIFT_VERSION = 3.0; 731 | }; 732 | name = Debug; 733 | }; 734 | 93340C6C1C064BD8004CCB0C /* Release */ = { 735 | isa = XCBuildConfiguration; 736 | baseConfigurationReference = 016A23251B4C347F777AE3E9 /* Pods-WordPressComKit-WordPressComKitTests.release.xcconfig */; 737 | buildSettings = { 738 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; 739 | INFOPLIST_FILE = WordPressComKitTests/Info.plist; 740 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 741 | PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressComKitTests; 742 | PRODUCT_NAME = "$(TARGET_NAME)"; 743 | SWIFT_VERSION = 3.0; 744 | }; 745 | name = Release; 746 | }; 747 | /* End XCBuildConfiguration section */ 748 | 749 | /* Begin XCConfigurationList section */ 750 | 93340C4D1C064BD8004CCB0C /* Build configuration list for PBXProject "WordPressComKit" */ = { 751 | isa = XCConfigurationList; 752 | buildConfigurations = ( 753 | 93340C651C064BD8004CCB0C /* Debug */, 754 | 93340C661C064BD8004CCB0C /* Release */, 755 | ); 756 | defaultConfigurationIsVisible = 0; 757 | defaultConfigurationName = Release; 758 | }; 759 | 93340C671C064BD8004CCB0C /* Build configuration list for PBXNativeTarget "WordPressComKit" */ = { 760 | isa = XCConfigurationList; 761 | buildConfigurations = ( 762 | 93340C681C064BD8004CCB0C /* Debug */, 763 | 93340C691C064BD8004CCB0C /* Release */, 764 | ); 765 | defaultConfigurationIsVisible = 0; 766 | defaultConfigurationName = Release; 767 | }; 768 | 93340C6A1C064BD8004CCB0C /* Build configuration list for PBXNativeTarget "WordPressComKitTests" */ = { 769 | isa = XCConfigurationList; 770 | buildConfigurations = ( 771 | 93340C6B1C064BD8004CCB0C /* Debug */, 772 | 93340C6C1C064BD8004CCB0C /* Release */, 773 | ); 774 | defaultConfigurationIsVisible = 0; 775 | defaultConfigurationName = Release; 776 | }; 777 | /* End XCConfigurationList section */ 778 | }; 779 | rootObject = 93340C4A1C064BD8004CCB0C /* Project object */; 780 | } 781 | -------------------------------------------------------------------------------- /WordPressComKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WordPressComKit.xcodeproj/xcshareddata/xcschemes/WordPressComKit.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 65 | 71 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /WordPressComKit.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /WordPressComKit/Alamofire+Extensions.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Alamofire 3 | 4 | 5 | /// Alamofire.Manager Helper Methods 6 | /// 7 | extension Alamofire.SessionManager 8 | { 9 | public func encodedMultipartRequest(_ request: RequestRouter, completion: @escaping ((_ request: UploadRequest?, _ error: Error?) -> Void)) { 10 | upload(multipartFormData: { multipartFormData in 11 | request.loadMultipartFields(multipartFormData) 12 | }, with: request, encodingCompletion: { encodingResult in 13 | switch encodingResult { 14 | case .success(let upload, _, _): 15 | completion(upload, nil) 16 | case .failure(let error): 17 | completion(nil, error) 18 | } 19 | }) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /WordPressComKit/AuthenticationService.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | // Unimplemented 4 | internal class AuthenticationService { 5 | func authorizeClient() { 6 | 7 | } 8 | 9 | func fetchOAuthToken() { 10 | 11 | } 12 | } -------------------------------------------------------------------------------- /WordPressComKit/DateHelpers.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public func convertUTCWordPressComDate(_ dateString: String) -> Date? { 4 | let dateFormatter = DateFormatter() 5 | dateFormatter.locale = Locale(identifier: "en_US_POSIX") 6 | dateFormatter.timeZone = TimeZone(identifier: "UTC") 7 | dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ" 8 | 9 | return dateFormatter.date(from: dateString) 10 | } 11 | -------------------------------------------------------------------------------- /WordPressComKit/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /WordPressComKit/Me.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | open class Me { 4 | var ID: Int! 5 | var displayName: String? 6 | var username: String! 7 | var email: String? 8 | var primaryBlogID: Int? 9 | var primaryBlogURL: URL? 10 | var language: String? 11 | var avatarURL: URL? 12 | var profileURL: URL? 13 | var verified = true 14 | var emailVerified = true 15 | var dateCreated: Date? 16 | var siteCount = 0 17 | var visibleSiteCount = 0 18 | var hasUnseenNotes = false 19 | var newestNoteType: String? 20 | var phoneAccount = false 21 | } 22 | -------------------------------------------------------------------------------- /WordPressComKit/MeService.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Alamofire 3 | 4 | open class MeService { 5 | public init() {} 6 | 7 | open func fetchMe(_ completion: @escaping (Me?, Error?) -> Void) { 8 | Alamofire 9 | .request(RequestRouter.me()) 10 | .validate() 11 | .responseJSON { response in 12 | guard response.result.isSuccess else { 13 | completion(nil, response.result.error as Error?) 14 | return 15 | } 16 | 17 | let json = response.result.value as? [String: AnyObject] 18 | let me = Me() 19 | me.ID = json!["ID"] as! Int 20 | me.displayName = json!["display_name"] as? String 21 | me.username = json!["username"] as! String 22 | me.email = json!["email"] as? String 23 | me.primaryBlogID = json!["primary_blog"] as? Int 24 | if let primaryBlogURLPath = json!["primary_blog_url"] as? String { 25 | me.primaryBlogURL = URL(string: primaryBlogURLPath) 26 | } 27 | me.language = json!["language"] as? String 28 | if let avatarURLPath = json!["avatar_URL"] as? String { 29 | me.avatarURL = URL(string: avatarURLPath) 30 | } 31 | if let profileURLPath = json!["profile_URL"] as? String { 32 | me.profileURL = URL(string: profileURLPath) 33 | } 34 | me.verified = json!["verified"] as! Bool 35 | me.emailVerified = json!["email_verified"] as! Bool 36 | me.dateCreated = convertUTCWordPressComDate(json!["date"] as! String) 37 | me.siteCount = json!["site_count"] as! Int 38 | me.visibleSiteCount = json!["visible_site_count"] as! Int 39 | me.hasUnseenNotes = json!["has_unseen_notes"] as! Bool 40 | me.newestNoteType = json!["newest_note_type"] as? String 41 | me.phoneAccount = json!["phone_account"] as! Bool 42 | 43 | completion(me, nil) 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /WordPressComKit/Media.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | open class Media { 5 | open let mediaID: Int 6 | open let remoteURL: String 7 | open let size: CGSize 8 | 9 | init(mediaID: Int, remoteURL: String, size: CGSize) { 10 | self.mediaID = mediaID 11 | self.remoteURL = remoteURL 12 | self.size = size 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /WordPressComKit/MediaService.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Alamofire 3 | 4 | 5 | open class MediaService { 6 | public init() { } 7 | 8 | public init(configuration: URLSessionConfiguration) { 9 | manager = Alamofire.SessionManager(configuration: configuration) 10 | } 11 | 12 | open func createMedia(_ attachedImageJPEGData: Data, siteID: Int, completion: @escaping ((_ media: Media?, _ error: Error?) -> Void)) { 13 | let request = RequestRouter.mediaNew(siteID: siteID, attachedImageJPEGData: attachedImageJPEGData) 14 | manager.encodedMultipartRequest(request) { (request, error) in 15 | guard let request = request else { 16 | completion(nil, error) 17 | return 18 | } 19 | 20 | request.responseJSON { response in 21 | guard response.result.isSuccess else { 22 | completion(nil, response.result.error) 23 | return 24 | } 25 | 26 | let json = response.result.value as! [String: AnyObject] 27 | let media = self.mapJSONToMedia(json) 28 | 29 | completion(media, nil) 30 | } 31 | } 32 | } 33 | 34 | fileprivate func mapJSONToMedia(_ json: [String: AnyObject]) -> Media? { 35 | guard let rawMediaList = json["media"] as? [[String: AnyObject]], 36 | let rawMedia = rawMediaList.first, 37 | let mediaID = rawMedia["ID"] as? Int, 38 | let mediaURL = rawMedia["URL"] as? String, 39 | let width = rawMedia["width"] as? Int, 40 | let height = rawMedia["height"] as? Int else 41 | { 42 | return nil 43 | } 44 | 45 | let size = CGSize(width: width, height: height) 46 | return Media(mediaID: mediaID, remoteURL: mediaURL, size: size) 47 | } 48 | 49 | fileprivate var manager = Alamofire.SessionManager.default 50 | } 51 | -------------------------------------------------------------------------------- /WordPressComKit/Post.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | open class Post { 4 | open var ID: Int? 5 | open var siteID: Int! 6 | open var created: Date! 7 | open var updated: Date? 8 | open var title: String? 9 | open var URL: Foundation.URL? 10 | open var shortURL: Foundation.URL? 11 | open var content: String? 12 | open var guid: String? 13 | open var status: String? 14 | open var featuredImageURL: Foundation.URL? 15 | } 16 | -------------------------------------------------------------------------------- /WordPressComKit/PostService.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Alamofire 3 | 4 | 5 | open class PostService { 6 | public init() { } 7 | 8 | public init(configuration: URLSessionConfiguration) { 9 | manager = Alamofire.SessionManager(configuration: configuration) 10 | } 11 | 12 | open func fetchPost(_ postID: Int, siteID: Int, completion: @escaping (_ post: Post?, _ error: Error?) -> Void) { 13 | manager 14 | .request(RequestRouter.post(postID: postID, siteID: siteID)) 15 | .validate() 16 | .responseJSON { response in 17 | guard response.result.isSuccess else { 18 | completion(nil, response.result.error) 19 | return 20 | } 21 | 22 | let json = response.result.value as! [String: AnyObject] 23 | 24 | let post = self.mapJSONToPost(json) 25 | 26 | completion(post, nil) 27 | } 28 | } 29 | 30 | open func createPost(siteID: Int, status: String, title: String, body: String, attachedImageJPEGData: Data? = nil, requestEqueued: (() -> Void)? = nil, completion: @escaping (_ post: Post?, _ error: Error?) -> Void) { 31 | let request = RequestRouter.postNew(siteID: siteID, status: status, title: title, body: body, attachedImageJPEGData: attachedImageJPEGData) 32 | manager.encodedMultipartRequest(request) { (request, error) in 33 | guard let request = request else { 34 | completion(nil, error) 35 | return 36 | } 37 | 38 | request 39 | .validate() 40 | .responseJSON { response in 41 | guard response.result.isSuccess else { 42 | completion(nil, response.result.error) 43 | return 44 | } 45 | 46 | let json = response.result.value as! [String: AnyObject] 47 | 48 | let post = self.mapJSONToPost(json) 49 | 50 | completion(post, nil) 51 | } 52 | 53 | requestEqueued?() 54 | } 55 | } 56 | 57 | func mapJSONToPost(_ json: [String: AnyObject]) -> Post { 58 | let post = Post() 59 | post.ID = json["ID"] as? Int 60 | post.siteID = json["site_ID"] as! Int 61 | post.created = convertUTCWordPressComDate(json["date"] as! String) 62 | if let modifiedDate = json["modified"] as? String { 63 | post.updated = convertUTCWordPressComDate(modifiedDate) 64 | } 65 | post.title = json["title"] as? String 66 | if let postURL = json["URL"] as? String { 67 | post.URL = URL(string: postURL)! 68 | } 69 | if let postShortURL = json["short_URL"] as? String { 70 | post.shortURL = URL(string: postShortURL)! 71 | } 72 | post.content = json["content"] as? String 73 | post.guid = json["guid"] as? String 74 | post.status = json["status"] as? String 75 | 76 | return post 77 | } 78 | 79 | fileprivate var manager = Alamofire.SessionManager.default 80 | } 81 | -------------------------------------------------------------------------------- /WordPressComKit/RequestRouter.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Alamofire 3 | 4 | public enum RequestRouter: URLRequestConvertible { 5 | static let baseURLString = "https://public-api.wordpress.com/rest/v1.1/" 6 | // FIXME: This needs to go somewhere better 7 | public static var bearerToken = "" 8 | 9 | case me() 10 | case mediaNew(siteID: Int, attachedImageJPEGData: Data) 11 | case post(postID: Int, siteID: Int) 12 | case postNew(siteID: Int, status: String, title: String, body: String, attachedImageJPEGData: Data?) 13 | case site(siteID: Int) 14 | case sites(showActiveOnly: Bool) 15 | 16 | public func asURLRequest() throws -> URLRequest { 17 | let result: (path: String, method: Alamofire.HTTPMethod, parameters: [String: Any]) = { 18 | switch self { 19 | case .me(): 20 | return ("me", .get, [String: Any]()) 21 | case .mediaNew(let siteID, _): 22 | return ("sites/\(siteID)/media/new", .post, [String: Any]()) 23 | case .post(let postID, let siteID): 24 | return ("sites/\(siteID)/posts/\(postID)", .get, [String: Any]()) 25 | case .postNew(let siteID, let status, let title, let body, _): 26 | return ("sites/\(siteID)/posts/new", .post, ["title": title, "content": body, "status": status]) 27 | case .site(let siteID): 28 | return ("sites/\(siteID)", .get, [String: Any]()) 29 | case .sites(let showActiveOnly): 30 | return ("me/sites", .get, ["site_visibility" : showActiveOnly ? "visible" : "all"]) 31 | } 32 | }() 33 | 34 | let URL = Foundation.URL(string: RequestRouter.baseURLString)! 35 | var request = URLRequest(url: URL.appendingPathComponent(result.path)) 36 | request.httpMethod = result.method.rawValue 37 | request.addValue("Bearer \(RequestRouter.bearerToken)", forHTTPHeaderField: "Authorization") 38 | let encoding: ParameterEncoding = result.method == .post ? Alamofire.JSONEncoding.default : Alamofire.URLEncoding.default 39 | 40 | return try encoding.encode(request, with: result.parameters) 41 | } 42 | 43 | public func loadMultipartFields(_ multipartFormData: MultipartFormData) { 44 | switch self { 45 | case .mediaNew(_, let attachedImageJPEGData): 46 | multipartFormData.append(attachedImageJPEGData, withName: "media[]", fileName: MediaSettings.filename, mimeType: MediaSettings.mimeType) 47 | case .postNew(_, let status, let title, let body, let attachedImageJPEGData): 48 | if let attachedImageData = attachedImageJPEGData { 49 | multipartFormData.append(attachedImageData, withName: "media[]", fileName: MediaSettings.filename, mimeType: MediaSettings.mimeType) 50 | } 51 | if let body = body.data(using: String.Encoding.utf8) { 52 | multipartFormData.append(body, withName: "content") 53 | } 54 | if let title = title.data(using: String.Encoding.utf8) { 55 | multipartFormData.append(title, withName: "title") 56 | } 57 | if let status = status.data(using: String.Encoding.utf8) { 58 | multipartFormData.append(status, withName: "status") 59 | } 60 | default: 61 | break 62 | } 63 | } 64 | 65 | 66 | fileprivate enum MediaSettings { 67 | static let filename = "image.jpg" 68 | static let mimeType = "image/jpeg" 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /WordPressComKit/Site.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | open class Site { 4 | open var ID: Int! 5 | open var name: String? 6 | open var description: String? 7 | open var URL: Foundation.URL! 8 | open var icon: String? 9 | open var jetpack = false 10 | open var postCount = 0 11 | open var subscribersCount = 0 12 | open var language = "en" 13 | open var visible = true 14 | open var isPrivate = false 15 | open var timeZone: TimeZone! 16 | 17 | // "icon": {"img": "https://secure.gravatar.com/blavatar/6f0ad402b5cbfe40cef23c63488742a7", "ico": "https://secure.gravatar.com/blavatar/1de1e43955ffc6998dbd037cb6fb0440"} 18 | // "logo": {"id": 0, "sizes": [], "url": ""} 19 | // "options": {"timezone": "America/Chicago", "gmt_offset": -6, "videopress_enabled": true, "upgraded_filetypes_enabled": true, "login_url": "https://astralbodiesnet.wordpress.com/wp-login.php", "admin_url": "https://astralbodiesnet.wordpress.com/wp-admin/" …} 20 | // "meta": {"links": {"self": "https://public-api.wordpress.com/rest/v1.1/sites/66592863", "help": "https://public-api.wordpress.com/rest/v1.1/sites/66592863/help", "posts": "https://public-api.wordpress.com/rest/v1.1/sites/66592863/posts/" …} …} 21 | // "capabilities": {"edit_pages": true, "edit_posts": true, "edit_others_posts": true, "edit_others_pages": true, "edit_theme_options": true, "edit_users": false, "list_users": true, "manage_categories": true, "manage_options": true …} 22 | // "plan": {"product_id": 1003, "product_slug": "value_bundle", "product_name_short": "Premium"} 23 | } 24 | -------------------------------------------------------------------------------- /WordPressComKit/SiteService.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Alamofire 3 | 4 | open class SiteService { 5 | public init() {} 6 | 7 | open func fetchSite(_ siteID: Int, completion: @escaping (Site?, NSError?) -> Void) { 8 | Alamofire 9 | .request(RequestRouter.site(siteID: siteID)) 10 | .validate() 11 | .responseJSON { response in 12 | guard response.result.isSuccess else { 13 | completion(nil, response.result.error as NSError?) 14 | return 15 | } 16 | 17 | let json = response.result.value as? [String: AnyObject] 18 | let site = self.mapJSONToSite(json!) 19 | 20 | completion(site, nil) 21 | } 22 | } 23 | 24 | open func fetchSites(_ showActiveOnly: Bool = true, completion:@escaping ([Site]?, NSError?) -> Void) { 25 | Alamofire 26 | .request(RequestRouter.sites(showActiveOnly: showActiveOnly)) 27 | .validate() 28 | .responseJSON { response in 29 | guard response.result.isSuccess else { 30 | completion(nil, response.result.error as NSError?) 31 | return 32 | } 33 | 34 | let json = response.result.value as? [String: AnyObject] 35 | let sitesDictionary = json!["sites"] as! [[String: AnyObject]] 36 | 37 | let sites = sitesDictionary.map(self.mapJSONToSite) 38 | 39 | completion(sites, nil) 40 | } 41 | } 42 | 43 | func mapJSONToSite(_ json: [String: AnyObject]) -> Site { 44 | let site = Site() 45 | 46 | let rawIcon = json["icon"] as? NSDictionary 47 | 48 | site.ID = json["ID"] as! Int 49 | site.name = json["name"] as? String 50 | site.description = json["description"] as? String 51 | site.URL = URL(string: json["URL"] as! String) 52 | site.icon = rawIcon?["img"] as? String 53 | site.jetpack = json["jetpack"] as! Bool 54 | site.postCount = json["post_count"] as! Int 55 | site.subscribersCount = json["subscribers_count"] as! Int 56 | site.language = json["lang"] as! String 57 | site.visible = json["visible"] as! Bool 58 | site.isPrivate = json["is_private"] as! Bool 59 | 60 | let options = json["options"] as? [String: AnyObject] 61 | if let timeZoneName = options?["timezone"] as? String { 62 | site.timeZone = TimeZone(identifier: timeZoneName) 63 | } 64 | 65 | return site 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /WordPressComKit/WordPressComAPIHelpers.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | func wordPressComBaseURL() -> URL { 4 | return URL(string: "https://public-api.wordpress.com/rest/v1.1/")! 5 | } 6 | -------------------------------------------------------------------------------- /WordPressComKit/WordPressComKit.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | //! Project version number for WordPressComKit. 4 | FOUNDATION_EXPORT double WordPressComKitVersionNumber; 5 | 6 | //! Project version string for WordPressComKit. 7 | FOUNDATION_EXPORT const unsigned char WordPressComKitVersionString[]; 8 | 9 | // In this header, you should import all the public headers of your framework using statements like #import 10 | 11 | 12 | -------------------------------------------------------------------------------- /WordPressComKitTests/DateHelpersTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import WordPressComKit 3 | 4 | class DateHelpersTests: XCTestCase { 5 | func testConvert() { 6 | let date = convertUTCWordPressComDate("2006-01-13T18:04:27+00:00") 7 | 8 | XCTAssertNotNil(date) 9 | 10 | var calendar = Calendar(identifier: Calendar.Identifier.gregorian) 11 | calendar.timeZone = TimeZone(identifier: "UTC")! 12 | let dateComponents = calendar.dateComponents([.year, .month, .day, .hour, .minute, .second], from: date!) 13 | 14 | XCTAssertEqual(2006, dateComponents.year) 15 | XCTAssertEqual(1, dateComponents.month) 16 | XCTAssertEqual(13, dateComponents.day) 17 | XCTAssertEqual(18, dateComponents.hour) 18 | XCTAssertEqual(4, dateComponents.minute) 19 | XCTAssertEqual(27, dateComponents.second) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /WordPressComKitTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /WordPressComKitTests/MeServiceTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import OHHTTPStubs 3 | import WordPressComKit 4 | 5 | class MeServiceTests: XCTestCase { 6 | var subject: MeService! 7 | 8 | override func setUp() { 9 | super.setUp() 10 | 11 | subject = MeService() 12 | } 13 | 14 | override func tearDown() { 15 | super.tearDown() 16 | 17 | subject = nil 18 | OHHTTPStubs.removeAllStubs() 19 | } 20 | 21 | func testFetchMe() { 22 | stub(condition: isMethodGET() && isHost("public-api.wordpress.com") && isPath("/rest/v1.1/me")) { _ in 23 | let stubPath = OHPathForFile("me.json", type(of: self)) 24 | return fixture(filePath: stubPath!, headers: ["Content-Type" as NSObject: "application/json" as AnyObject]) 25 | } 26 | 27 | let expectation = self.expectation(description: "FetchMe") 28 | 29 | subject.fetchMe { me, error -> Void in 30 | expectation.fulfill() 31 | XCTAssertNotNil(me) 32 | XCTAssertNil(error) 33 | } 34 | 35 | self.waitForExpectations(timeout: 2.0, handler: nil) 36 | } 37 | 38 | func testFetchMe2() { 39 | stub(condition: isMethodGET() && isHost("public-api.wordpress.com") && isPath("/rest/v1.1/me")) { _ in 40 | let stubPath = OHPathForFile("me-2.json", type(of: self)) 41 | return fixture(filePath: stubPath!, headers: ["Content-Type" as NSObject: "application/json" as AnyObject]) 42 | } 43 | 44 | let expectation = self.expectation(description: "FetchMe") 45 | 46 | subject.fetchMe { me, error -> Void in 47 | expectation.fulfill() 48 | XCTAssertNotNil(me) 49 | XCTAssertNil(error) 50 | } 51 | 52 | self.waitForExpectations(timeout: 2.0, handler: nil) 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /WordPressComKitTests/MediaServiceTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import OHHTTPStubs 3 | import WordPressComKit 4 | 5 | class MediaServiceTests: XCTestCase { 6 | var subject: MediaService! 7 | 8 | override func setUp() { 9 | super.setUp() 10 | 11 | subject = MediaService() 12 | } 13 | 14 | override func tearDown() { 15 | super.tearDown() 16 | 17 | subject = nil 18 | OHHTTPStubs.removeAllStubs() 19 | } 20 | 21 | func testCreateMediaFromImageInstance() { 22 | let siteID = 123 23 | let mediaSize = CGSize(width: 3000, height: 2002) 24 | let remoteURL = "https://lanteanartest.files.wordpress.com/2016/06/img_00035.jpg" 25 | 26 | stub(condition: isMethodPOST() && isHost("public-api.wordpress.com") && isPath("/rest/v1.1/sites/\(siteID)/media/new")) { _ in 27 | let stubPath = OHPathForFile("media.json", type(of: self)) 28 | return fixture(filePath: stubPath!, headers: ["Content-Type" as NSObject: "application/json" as AnyObject]) 29 | } 30 | 31 | let expectation = self.expectation(description: "CreateMedia") 32 | 33 | let imageURL = Bundle(for: type(of: self)).url(forResource: "wordpress-logo", withExtension: "png") 34 | XCTAssertNotNil(imageURL) 35 | 36 | let imageData = try? Data(contentsOf: imageURL!) 37 | XCTAssertNotNil(imageData) 38 | 39 | let rawImage = UIImage(data: imageData!) 40 | XCTAssertNotNil(rawImage) 41 | 42 | let attachedImagePNG = UIImagePNGRepresentation(rawImage!) 43 | XCTAssertNotNil(attachedImagePNG) 44 | 45 | subject.createMedia(attachedImagePNG!, siteID: siteID) { (media, error) in 46 | XCTAssertNotNil(media) 47 | XCTAssertEqual(media?.mediaID, siteID) 48 | XCTAssertEqual(media?.remoteURL, remoteURL) 49 | XCTAssertEqual(media?.size, mediaSize) 50 | XCTAssertNil(error) 51 | 52 | expectation.fulfill() 53 | } 54 | 55 | self.waitForExpectations(timeout: 2.0, handler: nil) 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /WordPressComKitTests/PostServiceTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import OHHTTPStubs 3 | import WordPressComKit 4 | 5 | class PostServiceTests: XCTestCase { 6 | var subject: PostService! 7 | 8 | override func setUp() { 9 | super.setUp() 10 | 11 | subject = PostService() 12 | } 13 | 14 | override func tearDown() { 15 | super.tearDown() 16 | 17 | subject = nil 18 | OHHTTPStubs.removeAllStubs() 19 | } 20 | 21 | func testFetchPost() { 22 | stub(condition: isMethodGET() && isHost("public-api.wordpress.com") && isPath("/rest/v1.1/sites/57773116/posts/57")) { _ in 23 | let stubPath = OHPathForFile("post.json", type(of: self)) 24 | return fixture(filePath: stubPath!, headers: ["Content-Type" as NSObject: "application/json" as AnyObject]) 25 | } 26 | 27 | let expectation = self.expectation(description: "FetchMe") 28 | 29 | subject.fetchPost(57, siteID: 57773116) { (post, error) -> Void in 30 | expectation.fulfill() 31 | 32 | XCTAssertNotNil(post) 33 | XCTAssertNil(error) 34 | 35 | XCTAssertEqual(57, post!.ID) 36 | XCTAssertEqual(57773116, post!.siteID) 37 | XCTAssertNotNil(post!.created) 38 | XCTAssertNotNil(post!.updated) 39 | XCTAssertEqual("Test post from the REST API", post!.title) 40 | XCTAssertEqual("https://ardwptest1.wordpress.com/2015/11/27/test-post-from-the-rest-api/", post!.URL?.absoluteString) 41 | XCTAssertEqual("http://wp.me/p3Upqs-V", post!.shortURL?.absoluteString) 42 | XCTAssertEqual("

And this is the content of the post.

\n", post!.content) 43 | XCTAssertEqual("https://ardwptest1.wordpress.com/2015/11/27/test-post-from-the-rest-api/", post!.guid) 44 | XCTAssertEqual("publish", post!.status) 45 | XCTAssertNil(post!.featuredImageURL) 46 | } 47 | 48 | self.waitForExpectations(timeout: 2.0, handler: nil) 49 | } 50 | 51 | func testCreatePost() { 52 | stub(condition: isMethodPOST() && isHost("public-api.wordpress.com") && isPath("/rest/v1.1/sites/57773116/posts/new")) { _ in 53 | let stubPath = OHPathForFile("post-new.json", type(of: self)) 54 | return fixture(filePath: stubPath!, headers: ["Content-Type" as NSObject: "application/json" as AnyObject]) 55 | } 56 | let expectation = self.expectation(description: "CreateMe") 57 | 58 | subject.createPost(siteID: 57773116, status: "publish", title: "Test Post", body: "This is the body.") { post, error in 59 | expectation.fulfill() 60 | 61 | XCTAssertNotNil(post) 62 | XCTAssertNil(error) 63 | 64 | XCTAssertEqual(57, post!.ID) 65 | XCTAssertEqual(57773116, post!.siteID) 66 | XCTAssertNotNil(post!.created) 67 | XCTAssertNotNil(post!.updated) 68 | XCTAssertEqual("Test post from the REST API", post!.title) 69 | XCTAssertEqual("https://ardwptest1.wordpress.com/2015/11/27/test-post-from-the-rest-api/", post!.URL?.absoluteString) 70 | XCTAssertEqual("http://wp.me/p3Upqs-V", post!.shortURL?.absoluteString) 71 | XCTAssertEqual("

And this is the content of the post.

\n", post!.content) 72 | XCTAssertEqual("https://ardwptest1.wordpress.com/2015/11/27/test-post-from-the-rest-api/", post!.guid) 73 | XCTAssertEqual("publish", post!.status) 74 | XCTAssertNil(post!.featuredImageURL) 75 | } 76 | 77 | self.waitForExpectations(timeout: 2.0, handler: nil) 78 | } 79 | 80 | 81 | } 82 | -------------------------------------------------------------------------------- /WordPressComKitTests/SiteServiceTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import OHHTTPStubs 3 | import WordPressComKit 4 | 5 | class SiteServiceTests: XCTestCase { 6 | var subject: SiteService! 7 | 8 | override func setUp() { 9 | super.setUp() 10 | 11 | subject = SiteService() 12 | } 13 | 14 | override func tearDown() { 15 | super.tearDown() 16 | 17 | subject = nil 18 | OHHTTPStubs.removeAllStubs() 19 | } 20 | 21 | func testFetchSite() { 22 | stub(condition: isMethodGET() && isHost("public-api.wordpress.com") && isPath("/rest/v1.1/sites/1234")) { _ in 23 | let stubPath = OHPathForFile("site.json", type(of: self)) 24 | return fixture(filePath: stubPath!, headers: ["Content-Type" as NSObject: "application/json" as AnyObject]) 25 | } 26 | 27 | let expectation = self.expectation(description: "FetchMe") 28 | 29 | subject.fetchSite(1234) { site, error -> Void in 30 | expectation.fulfill() 31 | 32 | XCTAssertNotNil(site) 33 | XCTAssertNil(error) 34 | 35 | XCTAssertEqual(66592863, site!.ID) 36 | XCTAssertEqual("The Dangling Pointer", site!.name) 37 | XCTAssertEqual("Sh*t my brain says and forgets about", site!.description) 38 | XCTAssertEqual("http://astralbodi.es", site!.URL.absoluteString) 39 | XCTAssertEqual("https://secure.gravatar.com/blavatar/6f0ad402b5cbfe40cef23c63488742a7", site!.icon) 40 | XCTAssertEqual(false, site!.jetpack) 41 | XCTAssertEqual(179, site!.postCount) 42 | XCTAssertEqual(233, site!.subscribersCount) 43 | XCTAssertEqual("en", site!.language) 44 | XCTAssertEqual(true, site!.visible) 45 | XCTAssertEqual(false, site!.isPrivate) 46 | XCTAssertEqual(TimeZone(identifier: "America/Chicago"), site!.timeZone) 47 | } 48 | 49 | self.waitForExpectations(timeout: 2.0, handler: nil) 50 | } 51 | 52 | func testFetchSiteHTTP500Error() { 53 | stub(condition: isMethodGET() && isHost("public-api.wordpress.com") && isPath("/rest/v1.1/sites/1234")) { _ in 54 | let stubPath = OHPathForFile("site.json", type(of: self)) 55 | return fixture(filePath: stubPath!, status: 500, headers: ["Content-Type" as NSObject: "application/json" as AnyObject]) 56 | } 57 | 58 | let expectation = self.expectation(description: "FetchMe") 59 | 60 | subject.fetchSite(1234) { site, error -> Void in 61 | expectation.fulfill() 62 | 63 | XCTAssertNil(site) 64 | XCTAssertNotNil(error) 65 | } 66 | 67 | self.waitForExpectations(timeout: 2.0, handler: nil) 68 | } 69 | 70 | func testFetchSites() { 71 | stub(condition: isMethodGET() && isHost("public-api.wordpress.com") && isPath("/rest/v1.1/me/sites")) { _ in 72 | let stubPath = OHPathForFile("sites.json", type(of: self)) 73 | return fixture(filePath: stubPath!, headers: ["Content-Type" as NSObject: "application/json" as AnyObject]) 74 | } 75 | 76 | let expectation = self.expectation(description: "FetchMe") 77 | 78 | subject.fetchSites { sites, error -> Void in 79 | expectation.fulfill() 80 | 81 | XCTAssertNotNil(sites) 82 | XCTAssertNil(error) 83 | 84 | XCTAssertEqual(13, sites!.count) 85 | } 86 | 87 | self.waitForExpectations(timeout: 2.0, handler: nil) 88 | } 89 | 90 | func testFetchSitesHTTP500Error() { 91 | stub(condition: isMethodGET() && isHost("public-api.wordpress.com") && isPath("/rest/v1.1/me/sites")) { _ in 92 | let stubPath = OHPathForFile("sites.json", type(of: self)) 93 | return fixture(filePath: stubPath!, status: 500, headers: ["Content-Type" as NSObject: "application/json" as AnyObject]) 94 | } 95 | 96 | let expectation = self.expectation(description: "FetchMe") 97 | 98 | subject.fetchSites { sites, error -> Void in 99 | expectation.fulfill() 100 | 101 | XCTAssertNil(sites) 102 | XCTAssertNotNil(error) 103 | } 104 | 105 | self.waitForExpectations(timeout: 2.0, handler: nil) 106 | } 107 | 108 | 109 | 110 | } 111 | -------------------------------------------------------------------------------- /WordPressComKitTests/Test Assets/wordpress-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automattic/WordPressComKit/1da71f56cb6c15e54820f0f084130ee65e1cc618/WordPressComKitTests/Test Assets/wordpress-logo.png -------------------------------------------------------------------------------- /WordPressComKitTests/Test Data/me-2.json: -------------------------------------------------------------------------------- 1 | { 2 | "ID": 552124769, 3 | "display_name": "monkeybread", 4 | "username": "monkeybread", 5 | "email": "monkeybread@example.com", 6 | "primary_blog": 12341234, 7 | "primary_blog_url": "http://unknownthing.wordpress.com", 8 | "language": "en", 9 | "token_site_id": false, 10 | "token_scope": [ 11 | "global" 12 | ], 13 | "avatar_URL": "https://2.gravatar.com/avatar/25c423b6c3907669104c65c9f03a185d?s=96&d=identicon", 14 | "profile_URL": "http://en.gravatar.com/monkeybread", 15 | "verified": true, 16 | "email_verified": true, 17 | "date": "2013-09-12T19:20:31+00:00", 18 | "site_count": 1, 19 | "visible_site_count": 1, 20 | "has_unseen_notes": false, 21 | "newest_note_type": "", 22 | "phone_account": false, 23 | "meta": { 24 | "links": { 25 | "self": "https://public-api.wordpress.com/rest/v1.1/me", 26 | "help": "https://public-api.wordpress.com/rest/v1.1/me/help", 27 | "site": "https://public-api.wordpress.com/rest/v1.1/sites/552124769", 28 | "flags": "https://public-api.wordpress.com/rest/v1.1/me/flags" 29 | } 30 | }, 31 | "is_valid_google_apps_country": true 32 | } -------------------------------------------------------------------------------- /WordPressComKitTests/Test Data/me.json: -------------------------------------------------------------------------------- 1 | { 2 | "ID": 671137, 3 | "display_name": "Boogie Woogie", 4 | "username": "boogiewoogie", 5 | "email": "boogiewoogie@example.com", 6 | "primary_blog": 123456, 7 | "primary_blog_url": "http://doesntexist.wordpress.com", 8 | "language": "en", 9 | "token_site_id": false, 10 | "token_scope": [ 11 | "global" 12 | ], 13 | "avatar_URL": "https://1.gravatar.com/avatar/moocow123?s=96&d=identicon", 14 | "profile_URL": "http://en.gravatar.com/moocow123", 15 | "verified": true, 16 | "email_verified": true, 17 | "date": "2006-01-13T18:04:27+00:00", 18 | "site_count": 166, 19 | "visible_site_count": 22, 20 | "has_unseen_notes": true, 21 | "newest_note_type": "follow", 22 | "phone_account": false, 23 | "meta": { 24 | "links": { 25 | "self": "https://public-api.wordpress.com/rest/v1.1/me", 26 | "help": "https://public-api.wordpress.com/rest/v1.1/me/help", 27 | "site": "https://public-api.wordpress.com/rest/v1.1/sites/5836086", 28 | "flags": "https://public-api.wordpress.com/rest/v1.1/me/flags" 29 | } 30 | }, 31 | "is_valid_google_apps_country": true 32 | } -------------------------------------------------------------------------------- /WordPressComKitTests/Test Data/media.json: -------------------------------------------------------------------------------- 1 | { 2 | "media": [{ 3 | "ID": 123, 4 | "URL": "https:\/\/lanteanartest.files.wordpress.com\/2016\/06\/img_00035.jpg", 5 | "guid": "http:\/\/lanteanartest.files.wordpress.com\/2016\/06\/img_00035.jpg", 6 | "date": "2016-06-15T18:41:18+00:00", 7 | "post_ID": 0, 8 | "author_ID": 45413599, 9 | "file": "img_00035.jpg", 10 | "mime_type": "image\/jpeg", 11 | "extension": "jpg", 12 | "caption": "", 13 | "description": "", 14 | "alt": "", 15 | "thumbnails": { 16 | "thumbnail": "https:\/\/lanteanartest.files.wordpress.com\/2016\/06\/img_00035.jpg?w=150", 17 | "medium": "https:\/\/lanteanartest.files.wordpress.com\/2016\/06\/img_00035.jpg?w=300", 18 | "large": "https:\/\/lanteanartest.files.wordpress.com\/2016\/06\/img_00035.jpg?w=1024" 19 | }, 20 | "height": 2002, 21 | "width": 3000, 22 | "exif": { 23 | "aperture": "10", 24 | "caption": "", 25 | "created_timestamp": "1344365531", 26 | "focal_length": "24", 27 | "iso": "200", 28 | "shutter_speed": "4", 29 | "title": "Godafoss", 30 | "orientation": "1", 31 | "keywords": [], 32 | "latitude": 65.682894444444, 33 | "longitude": -17.548927777778 34 | }, 35 | "meta": { 36 | "links": { 37 | "self": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/66291871\/media\/123", 38 | "help": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/66291871\/media\/123\/help", 39 | "site": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/66291871" 40 | } 41 | } 42 | }] 43 | } 44 | -------------------------------------------------------------------------------- /WordPressComKitTests/Test Data/post-new.json: -------------------------------------------------------------------------------- 1 | { 2 | "ID": 57, 3 | "site_ID": 57773116, 4 | "author": { 5 | "ID": 55224769, 6 | "login": "ardwptest1", 7 | "email": false, 8 | "name": "ardwptest1", 9 | "first_name": "", 10 | "last_name": "", 11 | "nice_name": "ardwptest1", 12 | "URL": "http://ardwptest1.wordpress.com", 13 | "avatar_URL": "https://2.gravatar.com/avatar/25c423b6c3907669104c65c9f03a185d?s=96&d=identicon&r=G", 14 | "profile_URL": "http://en.gravatar.com/ardwptest1", 15 | "site_ID": 57773116 16 | }, 17 | "date": "2015-11-27T19:49:57+00:00", 18 | "modified": "2015-11-27T19:49:57+00:00", 19 | "title": "Test post from the REST API", 20 | "URL": "https://ardwptest1.wordpress.com/2015/11/27/test-post-from-the-rest-api/", 21 | "short_URL": "http://wp.me/p3Upqs-V", 22 | "content": "

And this is the content of the post.

\n", 23 | "excerpt": "

And this is the content of the post.

\n", 24 | "slug": "test-post-from-the-rest-api", 25 | "guid": "https://ardwptest1.wordpress.com/2015/11/27/test-post-from-the-rest-api/", 26 | "status": "publish", 27 | "sticky": false, 28 | "password": "", 29 | "parent": false, 30 | "type": "post", 31 | "discussion": { 32 | "comments_open": true, 33 | "comment_status": "open", 34 | "pings_open": true, 35 | "ping_status": "open", 36 | "comment_count": 0 37 | }, 38 | "likes_enabled": true, 39 | "sharing_enabled": true, 40 | "like_count": 0, 41 | "i_like": 0, 42 | "is_reblogged": 0, 43 | "is_following": 0, 44 | "global_ID": "13c10cf91b39ab50ef528add3c3a8cc3", 45 | "featured_image": "", 46 | "post_thumbnail": null, 47 | "format": "standard", 48 | "geo": false, 49 | "menu_order": 0, 50 | "page_template": "", 51 | "publicize_URLs": [], 52 | "tags": {}, 53 | "categories": { 54 | "Uncategorized": { 55 | "ID": 1, 56 | "name": "Uncategorized", 57 | "slug": "uncategorized", 58 | "description": "", 59 | "post_count": 15, 60 | "parent": 0, 61 | "meta": { 62 | "links": { 63 | "self": "https://public-api.wordpress.com/rest/v1.1/sites/57773116/categories/slug:uncategorized", 64 | "help": "https://public-api.wordpress.com/rest/v1.1/sites/57773116/categories/slug:uncategorized/help", 65 | "site": "https://public-api.wordpress.com/rest/v1.1/sites/57773116" 66 | } 67 | } 68 | } 69 | }, 70 | "attachments": {}, 71 | "attachment_count": 0, 72 | "metadata": [ 73 | { 74 | "id": "259", 75 | "key": "email_notification", 76 | "value": "1448653801" 77 | }, 78 | { 79 | "id": "254", 80 | "key": "jabber_published", 81 | "value": "1448653799" 82 | } 83 | ], 84 | "meta": { 85 | "links": { 86 | "self": "https://public-api.wordpress.com/rest/v1.1/sites/57773116/posts/57", 87 | "help": "https://public-api.wordpress.com/rest/v1.1/sites/57773116/posts/57/help", 88 | "site": "https://public-api.wordpress.com/rest/v1.1/sites/57773116", 89 | "replies": "https://public-api.wordpress.com/rest/v1.1/sites/57773116/posts/57/replies/", 90 | "likes": "https://public-api.wordpress.com/rest/v1.1/sites/57773116/posts/57/likes/" 91 | } 92 | }, 93 | "capabilities": { 94 | "publish_post": true, 95 | "delete_post": true, 96 | "edit_post": true 97 | }, 98 | "other_URLs": { 99 | "suggested_slug": "test-post-from-the-rest-api", 100 | "permalink_URL": "https://ardwptest1.wordpress.com/2015/11/27/%postname%/" 101 | } 102 | } -------------------------------------------------------------------------------- /WordPressComKitTests/Test Data/post.json: -------------------------------------------------------------------------------- 1 | { 2 | "ID": 57, 3 | "site_ID": 57773116, 4 | "author": { 5 | "ID": 55224769, 6 | "login": "ardwptest1", 7 | "email": false, 8 | "name": "ardwptest1", 9 | "first_name": "", 10 | "last_name": "", 11 | "nice_name": "ardwptest1", 12 | "URL": "http://ardwptest1.wordpress.com", 13 | "avatar_URL": "https://2.gravatar.com/avatar/25c423b6c3907669104c65c9f03a185d?s=96&d=identicon&r=G", 14 | "profile_URL": "http://en.gravatar.com/ardwptest1", 15 | "site_ID": 57773116 16 | }, 17 | "date": "2015-11-27T19:49:57+00:00", 18 | "modified": "2015-11-27T19:49:57+00:00", 19 | "title": "Test post from the REST API", 20 | "URL": "https://ardwptest1.wordpress.com/2015/11/27/test-post-from-the-rest-api/", 21 | "short_URL": "http://wp.me/p3Upqs-V", 22 | "content": "

And this is the content of the post.

\n", 23 | "excerpt": "

And this is the content of the post.

\n", 24 | "slug": "test-post-from-the-rest-api", 25 | "guid": "https://ardwptest1.wordpress.com/2015/11/27/test-post-from-the-rest-api/", 26 | "status": "publish", 27 | "sticky": false, 28 | "password": "", 29 | "parent": false, 30 | "type": "post", 31 | "discussion": { 32 | "comments_open": true, 33 | "comment_status": "open", 34 | "pings_open": true, 35 | "ping_status": "open", 36 | "comment_count": 0 37 | }, 38 | "likes_enabled": true, 39 | "sharing_enabled": true, 40 | "like_count": 0, 41 | "i_like": 0, 42 | "is_reblogged": 0, 43 | "is_following": 0, 44 | "global_ID": "13c10cf91b39ab50ef528add3c3a8cc3", 45 | "featured_image": "", 46 | "post_thumbnail": null, 47 | "format": "standard", 48 | "geo": false, 49 | "menu_order": 0, 50 | "page_template": "", 51 | "publicize_URLs": [], 52 | "tags": {}, 53 | "categories": { 54 | "Uncategorized": { 55 | "ID": 1, 56 | "name": "Uncategorized", 57 | "slug": "uncategorized", 58 | "description": "", 59 | "post_count": 15, 60 | "parent": 0, 61 | "meta": { 62 | "links": { 63 | "self": "https://public-api.wordpress.com/rest/v1.1/sites/57773116/categories/slug:uncategorized", 64 | "help": "https://public-api.wordpress.com/rest/v1.1/sites/57773116/categories/slug:uncategorized/help", 65 | "site": "https://public-api.wordpress.com/rest/v1.1/sites/57773116" 66 | } 67 | } 68 | } 69 | }, 70 | "attachments": {}, 71 | "attachment_count": 0, 72 | "metadata": [ 73 | { 74 | "id": "259", 75 | "key": "email_notification", 76 | "value": "1448653801" 77 | }, 78 | { 79 | "id": "254", 80 | "key": "jabber_published", 81 | "value": "1448653799" 82 | } 83 | ], 84 | "meta": { 85 | "links": { 86 | "self": "https://public-api.wordpress.com/rest/v1.1/sites/57773116/posts/57", 87 | "help": "https://public-api.wordpress.com/rest/v1.1/sites/57773116/posts/57/help", 88 | "site": "https://public-api.wordpress.com/rest/v1.1/sites/57773116", 89 | "replies": "https://public-api.wordpress.com/rest/v1.1/sites/57773116/posts/57/replies/", 90 | "likes": "https://public-api.wordpress.com/rest/v1.1/sites/57773116/posts/57/likes/" 91 | } 92 | }, 93 | "capabilities": { 94 | "publish_post": true, 95 | "delete_post": true, 96 | "edit_post": true 97 | }, 98 | "other_URLs": {} 99 | } -------------------------------------------------------------------------------- /WordPressComKitTests/Test Data/site.json: -------------------------------------------------------------------------------- 1 | { 2 | "ID": 66592863, 3 | "name": "The Dangling Pointer", 4 | "description": "Sh*t my brain says and forgets about", 5 | "URL": "http://astralbodi.es", 6 | "jetpack": false, 7 | "post_count": 179, 8 | "subscribers_count": 233, 9 | "lang": "en", 10 | "icon": { 11 | "img": "https://secure.gravatar.com/blavatar/6f0ad402b5cbfe40cef23c63488742a7", 12 | "ico": "https://secure.gravatar.com/blavatar/1de1e43955ffc6998dbd037cb6fb0440" 13 | }, 14 | "logo": { 15 | "id": 0, 16 | "sizes": [], 17 | "url": "" 18 | }, 19 | "visible": true, 20 | "is_private": false, 21 | "is_following": true, 22 | "options": { 23 | "timezone": "America/Chicago", 24 | "gmt_offset": -6, 25 | "videopress_enabled": true, 26 | "upgraded_filetypes_enabled": true, 27 | "login_url": "https://astralbodiesnet.wordpress.com/wp-login.php", 28 | "admin_url": "https://astralbodiesnet.wordpress.com/wp-admin/", 29 | "is_mapped_domain": true, 30 | "is_redirect": false, 31 | "unmapped_url": "https://astralbodiesnet.wordpress.com", 32 | "featured_images_enabled": false, 33 | "theme_slug": "pub/ryu", 34 | "header_image": false, 35 | "background_color": "ECD078", 36 | "image_default_link_type": "file", 37 | "image_thumbnail_width": 150, 38 | "image_thumbnail_height": 150, 39 | "image_thumbnail_crop": 0, 40 | "image_medium_width": 300, 41 | "image_medium_height": 300, 42 | "image_large_width": 1024, 43 | "image_large_height": 1024, 44 | "permalink_structure": "/%year%/%monthnum%/%day%/%postname%/", 45 | "post_formats": [], 46 | "default_post_format": "0", 47 | "default_category": 1, 48 | "allowed_file_types": [ 49 | "jpg", 50 | "jpeg", 51 | "png", 52 | "gif", 53 | "pdf", 54 | "doc", 55 | "ppt", 56 | "odt", 57 | "pptx", 58 | "docx", 59 | "pps", 60 | "ppsx", 61 | "xls", 62 | "xlsx", 63 | "key", 64 | "mp3", 65 | "m4a", 66 | "wav", 67 | "ogg", 68 | "zip", 69 | "ogv", 70 | "mp4", 71 | "m4v", 72 | "mov", 73 | "wmv", 74 | "avi", 75 | "mpg", 76 | "3gp", 77 | "3g2" 78 | ], 79 | "show_on_front": "posts", 80 | "default_likes_enabled": true, 81 | "default_sharing_status": true, 82 | "default_comment_status": true, 83 | "default_ping_status": true, 84 | "software_version": "4.4-alpha-34640", 85 | "created_at": "2014-04-03T12:43:14+00:00", 86 | "wordads": false, 87 | "publicize_permanently_disabled": false 88 | }, 89 | "meta": { 90 | "links": { 91 | "self": "https://public-api.wordpress.com/rest/v1.1/sites/66592863", 92 | "help": "https://public-api.wordpress.com/rest/v1.1/sites/66592863/help", 93 | "posts": "https://public-api.wordpress.com/rest/v1.1/sites/66592863/posts/", 94 | "comments": "https://public-api.wordpress.com/rest/v1.1/sites/66592863/comments/", 95 | "xmlrpc": "https://astralbodiesnet.wordpress.com/xmlrpc.php" 96 | } 97 | } 98 | } -------------------------------------------------------------------------------- /WordPressComKitTests/Test Data/sites.json: -------------------------------------------------------------------------------- 1 | { 2 | "sites": [ 3 | { 4 | "ID": 66592863, 5 | "name": "The Dangling Pointer", 6 | "description": "Sh*t my brain says and forgets about", 7 | "URL": "http://astralbodi.es", 8 | "jetpack": false, 9 | "post_count": 179, 10 | "subscribers_count": 233, 11 | "lang": "en", 12 | "icon": { 13 | "img": "https://secure.gravatar.com/blavatar/6f0ad402b5cbfe40cef23c63488742a7", 14 | "ico": "https://secure.gravatar.com/blavatar/1de1e43955ffc6998dbd037cb6fb0440" 15 | }, 16 | "logo": { 17 | "id": 0, 18 | "sizes": [], 19 | "url": "" 20 | }, 21 | "visible": true, 22 | "is_private": false, 23 | "is_following": true, 24 | "options": { 25 | "timezone": "America/Chicago", 26 | "gmt_offset": -6, 27 | "videopress_enabled": true, 28 | "upgraded_filetypes_enabled": true, 29 | "login_url": "https://astralbodiesnet.wordpress.com/wp-login.php", 30 | "admin_url": "https://astralbodiesnet.wordpress.com/wp-admin/", 31 | "is_mapped_domain": true, 32 | "is_redirect": false, 33 | "unmapped_url": "https://astralbodiesnet.wordpress.com", 34 | "featured_images_enabled": false, 35 | "theme_slug": "pub/ryu", 36 | "header_image": false, 37 | "background_color": "ECD078", 38 | "image_default_link_type": "file", 39 | "image_thumbnail_width": 150, 40 | "image_thumbnail_height": 150, 41 | "image_thumbnail_crop": 0, 42 | "image_medium_width": 300, 43 | "image_medium_height": 300, 44 | "image_large_width": 1024, 45 | "image_large_height": 1024, 46 | "permalink_structure": "/%year%/%monthnum%/%day%/%postname%/", 47 | "post_formats": [], 48 | "default_post_format": "0", 49 | "default_category": 1, 50 | "allowed_file_types": [ 51 | "jpg", 52 | "jpeg", 53 | "png", 54 | "gif", 55 | "pdf", 56 | "doc", 57 | "ppt", 58 | "odt", 59 | "pptx", 60 | "docx", 61 | "pps", 62 | "ppsx", 63 | "xls", 64 | "xlsx", 65 | "key", 66 | "mp3", 67 | "m4a", 68 | "wav", 69 | "ogg", 70 | "zip", 71 | "ogv", 72 | "mp4", 73 | "m4v", 74 | "mov", 75 | "wmv", 76 | "avi", 77 | "mpg", 78 | "3gp", 79 | "3g2" 80 | ], 81 | "show_on_front": "posts", 82 | "default_likes_enabled": true, 83 | "default_sharing_status": true, 84 | "default_comment_status": true, 85 | "default_ping_status": true, 86 | "software_version": "4.4-alpha-34640", 87 | "created_at": "2014-04-03T12:43:14+00:00", 88 | "wordads": false, 89 | "publicize_permanently_disabled": false 90 | }, 91 | "meta": { 92 | "links": { 93 | "self": "https://public-api.wordpress.com/rest/v1.1/sites/66592863", 94 | "help": "https://public-api.wordpress.com/rest/v1.1/sites/66592863/help", 95 | "posts": "https://public-api.wordpress.com/rest/v1.1/sites/66592863/posts/", 96 | "comments": "https://public-api.wordpress.com/rest/v1.1/sites/66592863/comments/", 97 | "xmlrpc": "https://astralbodiesnet.wordpress.com/xmlrpc.php" 98 | } 99 | }, 100 | "user_can_manage": true, 101 | "is_vip": false, 102 | "is_multisite": true, 103 | "capabilities": { 104 | "edit_pages": true, 105 | "edit_posts": true, 106 | "edit_others_posts": true, 107 | "edit_others_pages": true, 108 | "edit_theme_options": true, 109 | "edit_users": false, 110 | "list_users": true, 111 | "manage_categories": true, 112 | "manage_options": true, 113 | "promote_users": true, 114 | "publish_posts": true, 115 | "upload_files": true, 116 | "view_stats": true 117 | }, 118 | "plan": { 119 | "product_id": 1003, 120 | "product_slug": "value_bundle", 121 | "product_name_short": "Premium" 122 | }, 123 | "single_user_site": true 124 | }, 125 | { 126 | "ID": 99664630, 127 | "name": "", 128 | "description": "", 129 | "URL": "https://thiswillneverhaveposts.wordpress.com", 130 | "jetpack": false, 131 | "post_count": 1, 132 | "subscribers_count": 0, 133 | "lang": "en", 134 | "logo": { 135 | "id": 0, 136 | "sizes": [], 137 | "url": "" 138 | }, 139 | "visible": true, 140 | "is_private": false, 141 | "is_following": false, 142 | "options": { 143 | "timezone": "", 144 | "gmt_offset": 0, 145 | "videopress_enabled": false, 146 | "upgraded_filetypes_enabled": false, 147 | "login_url": "https://thiswillneverhaveposts.wordpress.com/wp-login.php", 148 | "admin_url": "https://thiswillneverhaveposts.wordpress.com/wp-admin/", 149 | "is_mapped_domain": false, 150 | "is_redirect": false, 151 | "unmapped_url": "https://thiswillneverhaveposts.wordpress.com", 152 | "featured_images_enabled": false, 153 | "theme_slug": "pub/minnow", 154 | "header_image": false, 155 | "background_color": "333333", 156 | "image_default_link_type": "file", 157 | "image_thumbnail_width": 150, 158 | "image_thumbnail_height": 150, 159 | "image_thumbnail_crop": 0, 160 | "image_medium_width": 300, 161 | "image_medium_height": 300, 162 | "image_large_width": 1024, 163 | "image_large_height": 1024, 164 | "permalink_structure": "/%year%/%monthnum%/%day%/%postname%/", 165 | "post_formats": [], 166 | "default_post_format": "0", 167 | "default_category": 1, 168 | "allowed_file_types": [ 169 | "jpg", 170 | "jpeg", 171 | "png", 172 | "gif", 173 | "pdf", 174 | "doc", 175 | "ppt", 176 | "odt", 177 | "pptx", 178 | "docx", 179 | "pps", 180 | "ppsx", 181 | "xls", 182 | "xlsx", 183 | "key" 184 | ], 185 | "show_on_front": "posts", 186 | "default_likes_enabled": true, 187 | "default_sharing_status": true, 188 | "default_comment_status": true, 189 | "default_ping_status": true, 190 | "software_version": "4.4-alpha-34640", 191 | "created_at": "2015-09-16T18:04:22+00:00", 192 | "wordads": false, 193 | "publicize_permanently_disabled": false 194 | }, 195 | "meta": { 196 | "links": { 197 | "self": "https://public-api.wordpress.com/rest/v1.1/sites/99664630", 198 | "help": "https://public-api.wordpress.com/rest/v1.1/sites/99664630/help", 199 | "posts": "https://public-api.wordpress.com/rest/v1.1/sites/99664630/posts/", 200 | "comments": "https://public-api.wordpress.com/rest/v1.1/sites/99664630/comments/", 201 | "xmlrpc": "https://thiswillneverhaveposts.wordpress.com/xmlrpc.php" 202 | } 203 | }, 204 | "user_can_manage": true, 205 | "is_vip": false, 206 | "is_multisite": true, 207 | "capabilities": { 208 | "edit_pages": true, 209 | "edit_posts": true, 210 | "edit_others_posts": true, 211 | "edit_others_pages": true, 212 | "edit_theme_options": true, 213 | "edit_users": false, 214 | "list_users": true, 215 | "manage_categories": true, 216 | "manage_options": true, 217 | "promote_users": true, 218 | "publish_posts": true, 219 | "upload_files": true, 220 | "view_stats": true 221 | }, 222 | "plan": { 223 | "product_id": 1, 224 | "product_slug": "free_plan", 225 | "product_name_short": "Free" 226 | }, 227 | "single_user_site": true 228 | }, 229 | { 230 | "ID": 66533330, 231 | "name": "Aaron R. Douglas", 232 | "description": "Mobile Maker at Automattic", 233 | "URL": "http://astralbodies.me", 234 | "jetpack": false, 235 | "post_count": 15, 236 | "subscribers_count": 2, 237 | "lang": "en", 238 | "logo": { 239 | "id": 0, 240 | "sizes": [], 241 | "url": "" 242 | }, 243 | "visible": true, 244 | "is_private": false, 245 | "is_following": false, 246 | "options": { 247 | "timezone": "America/Chicago", 248 | "gmt_offset": -6, 249 | "videopress_enabled": true, 250 | "upgraded_filetypes_enabled": true, 251 | "login_url": "https://astralbodiesme.wordpress.com/wp-login.php", 252 | "admin_url": "https://astralbodiesme.wordpress.com/wp-admin/", 253 | "is_mapped_domain": true, 254 | "is_redirect": false, 255 | "unmapped_url": "https://astralbodiesme.wordpress.com", 256 | "featured_images_enabled": false, 257 | "theme_slug": "premium/profile", 258 | "header_image": { 259 | "attachment_id": 52, 260 | "url": "http://astralbodiesme.files.wordpress.com/2014/09/cropped-milwaukee-skyline.jpg", 261 | "thumbnail_url": "http://astralbodiesme.files.wordpress.com/2014/09/cropped-milwaukee-skyline.jpg", 262 | "height": 750, 263 | "width": 1500 264 | }, 265 | "background_color": "300030", 266 | "image_default_link_type": "file", 267 | "image_thumbnail_width": 150, 268 | "image_thumbnail_height": 150, 269 | "image_thumbnail_crop": 0, 270 | "image_medium_width": 300, 271 | "image_medium_height": 300, 272 | "image_large_width": 1024, 273 | "image_large_height": 1024, 274 | "permalink_structure": "/%year%/%monthnum%/%day%/%postname%/", 275 | "post_formats": [], 276 | "default_post_format": "0", 277 | "default_category": 1, 278 | "allowed_file_types": [ 279 | "jpg", 280 | "jpeg", 281 | "png", 282 | "gif", 283 | "pdf", 284 | "doc", 285 | "ppt", 286 | "odt", 287 | "pptx", 288 | "docx", 289 | "pps", 290 | "ppsx", 291 | "xls", 292 | "xlsx", 293 | "key", 294 | "mp3", 295 | "m4a", 296 | "wav", 297 | "ogg", 298 | "zip", 299 | "ogv", 300 | "mp4", 301 | "m4v", 302 | "mov", 303 | "wmv", 304 | "avi", 305 | "mpg", 306 | "3gp", 307 | "3g2" 308 | ], 309 | "show_on_front": "page", 310 | "default_likes_enabled": true, 311 | "default_sharing_status": true, 312 | "default_comment_status": true, 313 | "default_ping_status": true, 314 | "software_version": "4.4-alpha-34640", 315 | "created_at": "2014-04-02T13:39:01+00:00", 316 | "wordads": false, 317 | "publicize_permanently_disabled": false, 318 | "page_on_front": 1, 319 | "page_for_posts": 0 320 | }, 321 | "meta": { 322 | "links": { 323 | "self": "https://public-api.wordpress.com/rest/v1.1/sites/66533330", 324 | "help": "https://public-api.wordpress.com/rest/v1.1/sites/66533330/help", 325 | "posts": "https://public-api.wordpress.com/rest/v1.1/sites/66533330/posts/", 326 | "comments": "https://public-api.wordpress.com/rest/v1.1/sites/66533330/comments/", 327 | "xmlrpc": "https://astralbodiesme.wordpress.com/xmlrpc.php" 328 | } 329 | }, 330 | "user_can_manage": true, 331 | "is_vip": false, 332 | "is_multisite": true, 333 | "capabilities": { 334 | "edit_pages": true, 335 | "edit_posts": true, 336 | "edit_others_posts": true, 337 | "edit_others_pages": true, 338 | "edit_theme_options": true, 339 | "edit_users": false, 340 | "list_users": true, 341 | "manage_categories": true, 342 | "manage_options": true, 343 | "promote_users": true, 344 | "publish_posts": true, 345 | "upload_files": true, 346 | "view_stats": true 347 | }, 348 | "plan": { 349 | "product_id": 1003, 350 | "product_slug": "value_bundle", 351 | "product_name_short": "Premium" 352 | }, 353 | "single_user_site": true 354 | }, 355 | { 356 | "ID": 55674888, 357 | "name": "Astral Imagery", 358 | "description": "Photographs taken through the eyes of Astralbodies", 359 | "URL": "http://astralimagery.com", 360 | "jetpack": false, 361 | "post_count": 38, 362 | "subscribers_count": 18, 363 | "lang": "en", 364 | "logo": { 365 | "id": 0, 366 | "sizes": [], 367 | "url": "" 368 | }, 369 | "visible": true, 370 | "is_private": false, 371 | "is_following": true, 372 | "options": { 373 | "timezone": "America/Chicago", 374 | "gmt_offset": -6, 375 | "videopress_enabled": true, 376 | "upgraded_filetypes_enabled": true, 377 | "login_url": "https://astralbodies.wordpress.com/wp-login.php", 378 | "admin_url": "https://astralbodies.wordpress.com/wp-admin/", 379 | "is_mapped_domain": true, 380 | "is_redirect": false, 381 | "unmapped_url": "https://astralbodies.wordpress.com", 382 | "featured_images_enabled": false, 383 | "theme_slug": "pub/tonal", 384 | "header_image": false, 385 | "background_color": "dfe7ce", 386 | "image_default_link_type": "file", 387 | "image_thumbnail_width": 150, 388 | "image_thumbnail_height": 150, 389 | "image_thumbnail_crop": 0, 390 | "image_medium_width": 300, 391 | "image_medium_height": 300, 392 | "image_large_width": 1024, 393 | "image_large_height": 1024, 394 | "permalink_structure": "/%year%/%monthnum%/%day%/%postname%/", 395 | "post_formats": [], 396 | "default_post_format": "0", 397 | "default_category": 1, 398 | "allowed_file_types": [ 399 | "jpg", 400 | "jpeg", 401 | "png", 402 | "gif", 403 | "pdf", 404 | "doc", 405 | "ppt", 406 | "odt", 407 | "pptx", 408 | "docx", 409 | "pps", 410 | "ppsx", 411 | "xls", 412 | "xlsx", 413 | "key", 414 | "mp3", 415 | "m4a", 416 | "wav", 417 | "ogg", 418 | "zip", 419 | "ogv", 420 | "mp4", 421 | "m4v", 422 | "mov", 423 | "wmv", 424 | "avi", 425 | "mpg", 426 | "3gp", 427 | "3g2" 428 | ], 429 | "show_on_front": "posts", 430 | "default_likes_enabled": true, 431 | "default_sharing_status": true, 432 | "default_comment_status": true, 433 | "default_ping_status": true, 434 | "software_version": "4.4-alpha-34640", 435 | "created_at": "2013-07-24T12:17:26+00:00", 436 | "wordads": false, 437 | "publicize_permanently_disabled": false 438 | }, 439 | "meta": { 440 | "links": { 441 | "self": "https://public-api.wordpress.com/rest/v1.1/sites/55674888", 442 | "help": "https://public-api.wordpress.com/rest/v1.1/sites/55674888/help", 443 | "posts": "https://public-api.wordpress.com/rest/v1.1/sites/55674888/posts/", 444 | "comments": "https://public-api.wordpress.com/rest/v1.1/sites/55674888/comments/", 445 | "xmlrpc": "https://astralbodies.wordpress.com/xmlrpc.php" 446 | } 447 | }, 448 | "user_can_manage": true, 449 | "is_vip": false, 450 | "is_multisite": true, 451 | "capabilities": { 452 | "edit_pages": true, 453 | "edit_posts": true, 454 | "edit_others_posts": true, 455 | "edit_others_pages": true, 456 | "edit_theme_options": true, 457 | "edit_users": false, 458 | "list_users": true, 459 | "manage_categories": true, 460 | "manage_options": true, 461 | "promote_users": true, 462 | "publish_posts": true, 463 | "upload_files": true, 464 | "view_stats": true 465 | }, 466 | "plan": { 467 | "product_id": 1003, 468 | "product_slug": "value_bundle", 469 | "product_name_short": "Premium" 470 | }, 471 | "single_user_site": true 472 | }, 473 | { 474 | "ID": 55944830, 475 | "name": "Astralbodies Second Test Blog", 476 | "description": "The greatest WordPress.com site in all the land!", 477 | "URL": "https://standingdeskfreak.wordpress.com", 478 | "jetpack": false, 479 | "post_count": 25, 480 | "subscribers_count": 0, 481 | "lang": "en", 482 | "logo": { 483 | "id": 0, 484 | "sizes": [], 485 | "url": "" 486 | }, 487 | "visible": true, 488 | "is_private": false, 489 | "is_following": false, 490 | "options": { 491 | "timezone": "", 492 | "gmt_offset": 2, 493 | "videopress_enabled": false, 494 | "upgraded_filetypes_enabled": false, 495 | "login_url": "https://standingdeskfreak.wordpress.com/wp-login.php", 496 | "admin_url": "https://standingdeskfreak.wordpress.com/wp-admin/", 497 | "is_mapped_domain": false, 498 | "is_redirect": false, 499 | "unmapped_url": "https://standingdeskfreak.wordpress.com", 500 | "featured_images_enabled": false, 501 | "theme_slug": "pub/twentyten", 502 | "header_image": false, 503 | "background_color": false, 504 | "image_default_link_type": "file", 505 | "image_thumbnail_width": 150, 506 | "image_thumbnail_height": 150, 507 | "image_thumbnail_crop": 0, 508 | "image_medium_width": 300, 509 | "image_medium_height": 300, 510 | "image_large_width": 1024, 511 | "image_large_height": 1024, 512 | "permalink_structure": "/%year%/%monthnum%/%day%/%postname%/", 513 | "post_formats": [], 514 | "default_post_format": "standard", 515 | "default_category": 1, 516 | "allowed_file_types": [ 517 | "jpg", 518 | "jpeg", 519 | "png", 520 | "gif", 521 | "pdf", 522 | "doc", 523 | "ppt", 524 | "odt", 525 | "pptx", 526 | "docx", 527 | "pps", 528 | "ppsx", 529 | "xls", 530 | "xlsx", 531 | "key" 532 | ], 533 | "show_on_front": "posts", 534 | "default_likes_enabled": true, 535 | "default_sharing_status": true, 536 | "default_comment_status": true, 537 | "default_ping_status": true, 538 | "software_version": "4.4-alpha-34640", 539 | "created_at": "2013-07-31T13:09:47+00:00", 540 | "wordads": false, 541 | "publicize_permanently_disabled": false 542 | }, 543 | "meta": { 544 | "links": { 545 | "self": "https://public-api.wordpress.com/rest/v1.1/sites/55944830", 546 | "help": "https://public-api.wordpress.com/rest/v1.1/sites/55944830/help", 547 | "posts": "https://public-api.wordpress.com/rest/v1.1/sites/55944830/posts/", 548 | "comments": "https://public-api.wordpress.com/rest/v1.1/sites/55944830/comments/", 549 | "xmlrpc": "https://standingdeskfreak.wordpress.com/xmlrpc.php" 550 | } 551 | }, 552 | "user_can_manage": true, 553 | "is_vip": false, 554 | "is_multisite": true, 555 | "capabilities": { 556 | "edit_pages": true, 557 | "edit_posts": true, 558 | "edit_others_posts": true, 559 | "edit_others_pages": true, 560 | "edit_theme_options": true, 561 | "edit_users": false, 562 | "list_users": true, 563 | "manage_categories": true, 564 | "manage_options": true, 565 | "promote_users": true, 566 | "publish_posts": true, 567 | "upload_files": true, 568 | "view_stats": true 569 | }, 570 | "plan": { 571 | "product_id": 1, 572 | "product_slug": "free_plan", 573 | "product_name_short": "Free" 574 | }, 575 | "single_user_site": true 576 | }, 577 | { 578 | "ID": 55605385, 579 | "name": "Astralbodies' Test Blog", 580 | "description": "Smile! You’re at the best WordPress.com site ever", 581 | "URL": "https://maplebaconyummies.wordpress.com", 582 | "jetpack": false, 583 | "post_count": 55, 584 | "subscribers_count": 2, 585 | "lang": "en", 586 | "logo": { 587 | "id": 0, 588 | "sizes": [], 589 | "url": "" 590 | }, 591 | "visible": true, 592 | "is_private": false, 593 | "is_following": true, 594 | "options": { 595 | "timezone": "", 596 | "gmt_offset": 0, 597 | "videopress_enabled": true, 598 | "upgraded_filetypes_enabled": true, 599 | "login_url": "https://maplebaconyummies.wordpress.com/wp-login.php", 600 | "admin_url": "https://maplebaconyummies.wordpress.com/wp-admin/", 601 | "is_mapped_domain": false, 602 | "is_redirect": false, 603 | "unmapped_url": "https://maplebaconyummies.wordpress.com", 604 | "featured_images_enabled": false, 605 | "theme_slug": "pub/twentyeleven", 606 | "header_image": false, 607 | "background_color": false, 608 | "image_default_link_type": "file", 609 | "image_thumbnail_width": 150, 610 | "image_thumbnail_height": 150, 611 | "image_thumbnail_crop": 0, 612 | "image_medium_width": 300, 613 | "image_medium_height": 300, 614 | "image_large_width": 1024, 615 | "image_large_height": 1024, 616 | "permalink_structure": "/%year%/%monthnum%/%day%/%postname%/", 617 | "post_formats": [], 618 | "default_post_format": "0", 619 | "default_category": 1, 620 | "allowed_file_types": [ 621 | "jpg", 622 | "jpeg", 623 | "png", 624 | "gif", 625 | "pdf", 626 | "doc", 627 | "ppt", 628 | "odt", 629 | "pptx", 630 | "docx", 631 | "pps", 632 | "ppsx", 633 | "xls", 634 | "xlsx", 635 | "key", 636 | "mp3", 637 | "m4a", 638 | "wav", 639 | "ogg", 640 | "zip", 641 | "ogv", 642 | "mp4", 643 | "m4v", 644 | "mov", 645 | "wmv", 646 | "avi", 647 | "mpg", 648 | "3gp", 649 | "3g2" 650 | ], 651 | "show_on_front": "posts", 652 | "default_likes_enabled": true, 653 | "default_sharing_status": true, 654 | "default_comment_status": true, 655 | "default_ping_status": true, 656 | "software_version": "4.4-alpha-34640", 657 | "created_at": "2013-07-22T18:00:51+00:00", 658 | "wordads": false, 659 | "publicize_permanently_disabled": false 660 | }, 661 | "meta": { 662 | "links": { 663 | "self": "https://public-api.wordpress.com/rest/v1.1/sites/55605385", 664 | "help": "https://public-api.wordpress.com/rest/v1.1/sites/55605385/help", 665 | "posts": "https://public-api.wordpress.com/rest/v1.1/sites/55605385/posts/", 666 | "comments": "https://public-api.wordpress.com/rest/v1.1/sites/55605385/comments/", 667 | "xmlrpc": "https://maplebaconyummies.wordpress.com/xmlrpc.php" 668 | } 669 | }, 670 | "user_can_manage": true, 671 | "is_vip": false, 672 | "is_multisite": true, 673 | "capabilities": { 674 | "edit_pages": true, 675 | "edit_posts": true, 676 | "edit_others_posts": true, 677 | "edit_others_pages": true, 678 | "edit_theme_options": true, 679 | "edit_users": false, 680 | "list_users": true, 681 | "manage_categories": true, 682 | "manage_options": true, 683 | "promote_users": true, 684 | "publish_posts": true, 685 | "upload_files": true, 686 | "view_stats": true 687 | }, 688 | "plan": { 689 | "product_id": 1003, 690 | "product_slug": "value_bundle", 691 | "product_name_short": "Premium" 692 | }, 693 | "single_user_site": true 694 | }, 695 | { 696 | "ID": 39085466, 697 | "name": "Make WordPress Mobile", 698 | "description": "Just another make.wordpress.org site", 699 | "URL": "http://make.wordpress.org/mobile", 700 | "jetpack": true, 701 | "post_count": 258, 702 | "subscribers_count": 132, 703 | "lang": "en", 704 | "logo": { 705 | "id": 0, 706 | "sizes": [], 707 | "url": "" 708 | }, 709 | "visible": true, 710 | "is_private": false, 711 | "is_following": true, 712 | "options": { 713 | "timezone": "", 714 | "gmt_offset": 0, 715 | "videopress_enabled": false, 716 | "upgraded_filetypes_enabled": true, 717 | "login_url": "https://make.wordpress.org/mobile/wp-login.php", 718 | "admin_url": "https://make.wordpress.org/mobile/wp-admin/", 719 | "is_mapped_domain": true, 720 | "is_redirect": false, 721 | "unmapped_url": "https://make.wordpress.org/mobile", 722 | "featured_images_enabled": false, 723 | "theme_slug": "pub/wporg-p2", 724 | "header_image": false, 725 | "background_color": false, 726 | "image_default_link_type": "file", 727 | "image_thumbnail_width": 150, 728 | "image_thumbnail_height": 150, 729 | "image_thumbnail_crop": 0, 730 | "image_medium_width": 300, 731 | "image_medium_height": 300, 732 | "image_large_width": 1024, 733 | "image_large_height": 1024, 734 | "permalink_structure": "/%year%/%monthnum%/%day%/%postname%/", 735 | "post_formats": [], 736 | "default_post_format": "0", 737 | "default_category": 1, 738 | "allowed_file_types": [ 739 | "jpg", 740 | "jpeg", 741 | "png", 742 | "gif", 743 | "pdf", 744 | "doc", 745 | "ppt", 746 | "odt", 747 | "pptx", 748 | "docx", 749 | "pps", 750 | "ppsx", 751 | "xls", 752 | "xlsx", 753 | "key" 754 | ], 755 | "show_on_front": "posts", 756 | "default_likes_enabled": true, 757 | "default_sharing_status": false, 758 | "default_comment_status": true, 759 | "default_ping_status": true, 760 | "software_version": "4.4-RC1-35744", 761 | "created_at": "2012-08-04T18:30:12+00:00", 762 | "wordads": false, 763 | "publicize_permanently_disabled": false, 764 | "jetpack_version": "3.7.2", 765 | "main_network_site": "https://make.wordpress.org", 766 | "active_modules": [ 767 | "latex", 768 | "shortlinks", 769 | "stats", 770 | "widgets", 771 | "gravatar-hovercards", 772 | "subscriptions", 773 | "sharedaddy", 774 | "shortcodes", 775 | "enhanced-distribution", 776 | "contact-form", 777 | "custom-css", 778 | "publicize", 779 | "post-by-email", 780 | "notes", 781 | "mobile-push", 782 | "widget-visibility", 783 | "omnisearch", 784 | "protect" 785 | ], 786 | "max_upload_size": false, 787 | "is_multi_network": true, 788 | "is_multi_site": true, 789 | "file_mod_disabled": [ 790 | "is_version_controlled", 791 | "has_no_file_system_write_access", 792 | "disallow_file_mods" 793 | ] 794 | }, 795 | "meta": { 796 | "links": { 797 | "self": "https://public-api.wordpress.com/rest/v1.1/sites/39085466", 798 | "help": "https://public-api.wordpress.com/rest/v1.1/sites/39085466/help", 799 | "posts": "https://public-api.wordpress.com/rest/v1.1/sites/39085466/posts/", 800 | "comments": "https://public-api.wordpress.com/rest/v1.1/sites/39085466/comments/", 801 | "xmlrpc": "https://make.wordpress.org/mobile/xmlrpc.php" 802 | } 803 | }, 804 | "updates": [ 805 | false 806 | ], 807 | "user_can_manage": true, 808 | "is_vip": false, 809 | "is_multisite": true, 810 | "capabilities": { 811 | "edit_pages": true, 812 | "edit_posts": true, 813 | "edit_others_posts": true, 814 | "edit_others_pages": true, 815 | "edit_theme_options": true, 816 | "edit_users": false, 817 | "list_users": true, 818 | "manage_categories": true, 819 | "manage_options": true, 820 | "promote_users": true, 821 | "publish_posts": true, 822 | "upload_files": true, 823 | "view_stats": true 824 | }, 825 | "plan": { 826 | "product_id": 2002, 827 | "product_slug": "jetpack_free", 828 | "product_name_short": "Free" 829 | }, 830 | "single_user_site": false 831 | }, 832 | { 833 | "ID": 59723504, 834 | "name": "ndksjsjsjs", 835 | "description": "A fine WordPress.com site", 836 | "URL": "https://jejsjejsnw.wordpress.com", 837 | "jetpack": false, 838 | "post_count": 1, 839 | "subscribers_count": 0, 840 | "lang": "en", 841 | "logo": { 842 | "id": 0, 843 | "sizes": [], 844 | "url": "" 845 | }, 846 | "visible": true, 847 | "is_private": false, 848 | "is_following": false, 849 | "options": { 850 | "timezone": "", 851 | "gmt_offset": 0, 852 | "videopress_enabled": false, 853 | "upgraded_filetypes_enabled": false, 854 | "login_url": "https://jejsjejsnw.wordpress.com/wp-login.php", 855 | "admin_url": "https://jejsjejsnw.wordpress.com/wp-admin/", 856 | "is_mapped_domain": false, 857 | "is_redirect": false, 858 | "unmapped_url": "https://jejsjejsnw.wordpress.com", 859 | "featured_images_enabled": false, 860 | "theme_slug": "pub/bushwick", 861 | "header_image": false, 862 | "background_color": false, 863 | "image_default_link_type": "file", 864 | "image_thumbnail_width": 150, 865 | "image_thumbnail_height": 150, 866 | "image_thumbnail_crop": 0, 867 | "image_medium_width": 300, 868 | "image_medium_height": 300, 869 | "image_large_width": 1024, 870 | "image_large_height": 1024, 871 | "permalink_structure": "/%year%/%monthnum%/%day%/%postname%/", 872 | "post_formats": [], 873 | "default_post_format": "0", 874 | "default_category": 1, 875 | "allowed_file_types": [ 876 | "jpg", 877 | "jpeg", 878 | "png", 879 | "gif", 880 | "pdf", 881 | "doc", 882 | "ppt", 883 | "odt", 884 | "pptx", 885 | "docx", 886 | "pps", 887 | "ppsx", 888 | "xls", 889 | "xlsx", 890 | "key" 891 | ], 892 | "show_on_front": "posts", 893 | "default_likes_enabled": true, 894 | "default_sharing_status": true, 895 | "default_comment_status": true, 896 | "default_ping_status": true, 897 | "software_version": "4.4-alpha-34640", 898 | "created_at": "2013-10-23T18:33:23+00:00", 899 | "wordads": false, 900 | "publicize_permanently_disabled": false 901 | }, 902 | "meta": { 903 | "links": { 904 | "self": "https://public-api.wordpress.com/rest/v1.1/sites/59723504", 905 | "help": "https://public-api.wordpress.com/rest/v1.1/sites/59723504/help", 906 | "posts": "https://public-api.wordpress.com/rest/v1.1/sites/59723504/posts/", 907 | "comments": "https://public-api.wordpress.com/rest/v1.1/sites/59723504/comments/", 908 | "xmlrpc": "https://jejsjejsnw.wordpress.com/xmlrpc.php" 909 | } 910 | }, 911 | "user_can_manage": true, 912 | "is_vip": false, 913 | "is_multisite": true, 914 | "capabilities": { 915 | "edit_pages": true, 916 | "edit_posts": true, 917 | "edit_others_posts": true, 918 | "edit_others_pages": true, 919 | "edit_theme_options": true, 920 | "edit_users": false, 921 | "list_users": true, 922 | "manage_categories": true, 923 | "manage_options": true, 924 | "promote_users": true, 925 | "publish_posts": true, 926 | "upload_files": true, 927 | "view_stats": true 928 | }, 929 | "plan": { 930 | "product_id": 1, 931 | "product_slug": "free_plan", 932 | "product_name_short": "Free" 933 | }, 934 | "single_user_site": true 935 | }, 936 | { 937 | "ID": 66091177, 938 | "name": "Net Workz LLC", 939 | "description": "Indie Software Development", 940 | "URL": "http://www.networkzllc.net", 941 | "jetpack": true, 942 | "post_count": 14, 943 | "subscribers_count": 1, 944 | "lang": "en", 945 | "logo": { 946 | "id": 0, 947 | "sizes": [], 948 | "url": "" 949 | }, 950 | "visible": true, 951 | "is_private": false, 952 | "is_following": true, 953 | "options": { 954 | "timezone": "America/Chicago", 955 | "gmt_offset": -6, 956 | "videopress_enabled": false, 957 | "upgraded_filetypes_enabled": true, 958 | "login_url": "http://www.networkzllc.net/wp-login.php", 959 | "admin_url": "http://www.networkzllc.net/wp-admin/", 960 | "is_mapped_domain": true, 961 | "is_redirect": false, 962 | "unmapped_url": "http://www.networkzllc.net", 963 | "featured_images_enabled": false, 964 | "theme_slug": "twentyfifteen", 965 | "header_image": false, 966 | "background_color": "674970", 967 | "image_default_link_type": "file", 968 | "image_thumbnail_width": 150, 969 | "image_thumbnail_height": 150, 970 | "image_thumbnail_crop": 0, 971 | "image_medium_width": 300, 972 | "image_medium_height": 300, 973 | "image_large_width": 1024, 974 | "image_large_height": 1024, 975 | "permalink_structure": "/%year%/%monthnum%/%day%/%postname%/", 976 | "post_formats": [], 977 | "default_post_format": "0", 978 | "default_category": 1, 979 | "allowed_file_types": [ 980 | "jpg", 981 | "jpeg", 982 | "png", 983 | "gif", 984 | "pdf", 985 | "doc", 986 | "ppt", 987 | "odt", 988 | "pptx", 989 | "docx", 990 | "pps", 991 | "ppsx", 992 | "xls", 993 | "xlsx", 994 | "key" 995 | ], 996 | "show_on_front": "posts", 997 | "default_likes_enabled": true, 998 | "default_sharing_status": false, 999 | "default_comment_status": true, 1000 | "default_ping_status": true, 1001 | "software_version": "4.3.1", 1002 | "created_at": "2014-03-24T19:24:44+00:00", 1003 | "wordads": false, 1004 | "publicize_permanently_disabled": false, 1005 | "jetpack_version": "3.8.0", 1006 | "main_network_site": "http://www.networkzllc.net", 1007 | "active_modules": [ 1008 | "after-the-deadline", 1009 | "custom-content-types", 1010 | "custom-css", 1011 | "enhanced-distribution", 1012 | "gravatar-hovercards", 1013 | "json-api", 1014 | "latex", 1015 | "notes", 1016 | "omnisearch", 1017 | "post-by-email", 1018 | "protect", 1019 | "publicize", 1020 | "sharedaddy", 1021 | "shortcodes", 1022 | "shortlinks", 1023 | "stats", 1024 | "subscriptions", 1025 | "verification-tools", 1026 | "widget-visibility", 1027 | "widgets", 1028 | "contact-form", 1029 | "monitor", 1030 | "manage" 1031 | ], 1032 | "max_upload_size": "2097152", 1033 | "is_multi_network": false, 1034 | "is_multi_site": false, 1035 | "file_mod_disabled": false 1036 | }, 1037 | "meta": { 1038 | "links": { 1039 | "self": "https://public-api.wordpress.com/rest/v1.1/sites/66091177", 1040 | "help": "https://public-api.wordpress.com/rest/v1.1/sites/66091177/help", 1041 | "posts": "https://public-api.wordpress.com/rest/v1.1/sites/66091177/posts/", 1042 | "comments": "https://public-api.wordpress.com/rest/v1.1/sites/66091177/comments/", 1043 | "xmlrpc": "http://www.networkzllc.net/xmlrpc.php" 1044 | } 1045 | }, 1046 | "updates": { 1047 | "plugins": 0, 1048 | "themes": 0, 1049 | "wordpress": 0, 1050 | "translations": 0, 1051 | "total": 0 1052 | }, 1053 | "user_can_manage": true, 1054 | "is_vip": false, 1055 | "is_multisite": false, 1056 | "capabilities": { 1057 | "edit_pages": true, 1058 | "edit_posts": true, 1059 | "edit_others_posts": true, 1060 | "edit_others_pages": true, 1061 | "edit_theme_options": true, 1062 | "edit_users": false, 1063 | "list_users": true, 1064 | "manage_categories": true, 1065 | "manage_options": true, 1066 | "promote_users": true, 1067 | "publish_posts": true, 1068 | "upload_files": true, 1069 | "view_stats": true 1070 | }, 1071 | "plan": { 1072 | "product_id": 2002, 1073 | "product_slug": "jetpack_free", 1074 | "product_name_short": "Free" 1075 | }, 1076 | "single_user_site": true 1077 | }, 1078 | { 1079 | "ID": 87293438, 1080 | "name": "Office Today", 1081 | "description": "Automatticians can work from anywhere – it can be pretty awesome.", 1082 | "URL": "https://officetoday.wordpress.com", 1083 | "jetpack": false, 1084 | "post_count": 166, 1085 | "subscribers_count": 128, 1086 | "lang": "en", 1087 | "icon": { 1088 | "img": "https://secure.gravatar.com/blavatar/ec1d1ad56834bbbaafe44d0a970b4a10", 1089 | "ico": "https://secure.gravatar.com/blavatar/a85f8eb3d4e1f105376b19bf000c3433" 1090 | }, 1091 | "logo": { 1092 | "id": 465, 1093 | "sizes": { 1094 | "thumbnail": { 1095 | "height": 30, 1096 | "width": 150, 1097 | "url": "https://officetoday.files.wordpress.com/2015/06/automattic-logo.jpg?w=150", 1098 | "orientation": "landscape" 1099 | }, 1100 | "medium": { 1101 | "height": 60, 1102 | "width": 300, 1103 | "url": "https://officetoday.files.wordpress.com/2015/06/automattic-logo.jpg?w=300", 1104 | "orientation": "landscape" 1105 | }, 1106 | "boardwalk-featured-image": { 1107 | "height": 100, 1108 | "width": 500, 1109 | "url": "https://officetoday.files.wordpress.com/2015/06/automattic-logo.jpg?w=500&h=100&crop=1", 1110 | "orientation": "landscape" 1111 | }, 1112 | "boardwalk-hero-image": { 1113 | "height": 100, 1114 | "width": 500, 1115 | "url": "https://officetoday.files.wordpress.com/2015/06/automattic-logo.jpg?w=500&h=100&crop=1", 1116 | "orientation": "landscape" 1117 | }, 1118 | "boardwalk-logo": { 1119 | "height": 89, 1120 | "width": 444, 1121 | "url": "https://officetoday.files.wordpress.com/2015/06/automattic-logo.jpg?w=444", 1122 | "orientation": "landscape" 1123 | }, 1124 | "jetpack-portfolio-admin-thumb": { 1125 | "height": 50, 1126 | "width": 50, 1127 | "url": "https://officetoday.files.wordpress.com/2015/06/automattic-logo.jpg?w=50&h=50&crop=1", 1128 | "orientation": "landscape" 1129 | }, 1130 | "full": { 1131 | "url": "https://officetoday.files.wordpress.com/2015/06/automattic-logo.jpg", 1132 | "height": 100, 1133 | "width": 500, 1134 | "orientation": "landscape" 1135 | } 1136 | }, 1137 | "url": "https://officetoday.files.wordpress.com/2015/06/automattic-logo.jpg" 1138 | }, 1139 | "visible": true, 1140 | "is_private": false, 1141 | "is_following": true, 1142 | "options": { 1143 | "timezone": "", 1144 | "gmt_offset": 0, 1145 | "videopress_enabled": true, 1146 | "upgraded_filetypes_enabled": true, 1147 | "login_url": "https://officetoday.wordpress.com/wp-login.php", 1148 | "admin_url": "https://officetoday.wordpress.com/wp-admin/", 1149 | "is_mapped_domain": false, 1150 | "is_redirect": false, 1151 | "unmapped_url": "https://officetoday.wordpress.com", 1152 | "featured_images_enabled": false, 1153 | "theme_slug": "pub/cubic", 1154 | "header_image": false, 1155 | "background_color": false, 1156 | "image_default_link_type": "file", 1157 | "image_thumbnail_width": 150, 1158 | "image_thumbnail_height": 150, 1159 | "image_thumbnail_crop": 0, 1160 | "image_medium_width": 300, 1161 | "image_medium_height": 300, 1162 | "image_large_width": 1024, 1163 | "image_large_height": 1024, 1164 | "permalink_structure": "/%year%/%monthnum%/%day%/%postname%/", 1165 | "post_formats": [], 1166 | "default_post_format": "image", 1167 | "default_category": 1, 1168 | "allowed_file_types": [ 1169 | "jpg", 1170 | "jpeg", 1171 | "png", 1172 | "gif", 1173 | "pdf", 1174 | "doc", 1175 | "ppt", 1176 | "odt", 1177 | "pptx", 1178 | "docx", 1179 | "pps", 1180 | "ppsx", 1181 | "xls", 1182 | "xlsx", 1183 | "key", 1184 | "mp3", 1185 | "m4a", 1186 | "wav", 1187 | "ogg", 1188 | "zip", 1189 | "ogv", 1190 | "mp4", 1191 | "m4v", 1192 | "mov", 1193 | "wmv", 1194 | "avi", 1195 | "mpg", 1196 | "3gp", 1197 | "3g2" 1198 | ], 1199 | "show_on_front": "posts", 1200 | "default_likes_enabled": true, 1201 | "default_sharing_status": true, 1202 | "default_comment_status": false, 1203 | "default_ping_status": true, 1204 | "software_version": "4.4-alpha-34640", 1205 | "created_at": "2015-03-17T19:26:44+00:00", 1206 | "wordads": false, 1207 | "publicize_permanently_disabled": false 1208 | }, 1209 | "meta": { 1210 | "links": { 1211 | "self": "https://public-api.wordpress.com/rest/v1.1/sites/87293438", 1212 | "help": "https://public-api.wordpress.com/rest/v1.1/sites/87293438/help", 1213 | "posts": "https://public-api.wordpress.com/rest/v1.1/sites/87293438/posts/", 1214 | "comments": "https://public-api.wordpress.com/rest/v1.1/sites/87293438/comments/", 1215 | "xmlrpc": "https://officetoday.wordpress.com/xmlrpc.php" 1216 | } 1217 | }, 1218 | "user_can_manage": false, 1219 | "is_vip": false, 1220 | "is_multisite": true, 1221 | "capabilities": { 1222 | "edit_pages": true, 1223 | "edit_posts": true, 1224 | "edit_others_posts": true, 1225 | "edit_others_pages": true, 1226 | "edit_theme_options": false, 1227 | "edit_users": false, 1228 | "list_users": false, 1229 | "manage_categories": true, 1230 | "manage_options": false, 1231 | "promote_users": false, 1232 | "publish_posts": true, 1233 | "upload_files": true, 1234 | "view_stats": true 1235 | }, 1236 | "plan": { 1237 | "product_id": 1003, 1238 | "product_slug": "value_bundle", 1239 | "product_name_short": "Premium" 1240 | }, 1241 | "single_user_site": false 1242 | }, 1243 | { 1244 | "ID": 66336813, 1245 | "name": "Saukville Historical Society", 1246 | "description": "Saukville, WI USA", 1247 | "URL": "http://saukvillehistory.org", 1248 | "jetpack": false, 1249 | "post_count": 122, 1250 | "subscribers_count": 1, 1251 | "lang": "en", 1252 | "logo": { 1253 | "id": 0, 1254 | "sizes": [], 1255 | "url": "" 1256 | }, 1257 | "visible": true, 1258 | "is_private": false, 1259 | "is_following": true, 1260 | "options": { 1261 | "timezone": "America/Chicago", 1262 | "gmt_offset": -6, 1263 | "videopress_enabled": true, 1264 | "upgraded_filetypes_enabled": true, 1265 | "login_url": "https://saukvillehistory.wordpress.com/wp-login.php", 1266 | "admin_url": "https://saukvillehistory.wordpress.com/wp-admin/", 1267 | "is_mapped_domain": true, 1268 | "is_redirect": false, 1269 | "unmapped_url": "https://saukvillehistory.wordpress.com", 1270 | "featured_images_enabled": false, 1271 | "theme_slug": "pub/parament", 1272 | "header_image": { 1273 | "attachment_id": 386, 1274 | "url": "https://saukvillehistory.files.wordpress.com/2015/06/saukvillebridge-header.jpg", 1275 | "thumbnail_url": "https://saukvillehistory.files.wordpress.com/2015/06/saukvillebridge-header.jpg", 1276 | "height": 200, 1277 | "width": 950 1278 | }, 1279 | "background_color": "5e7682", 1280 | "image_default_link_type": "file", 1281 | "image_thumbnail_width": 150, 1282 | "image_thumbnail_height": 150, 1283 | "image_thumbnail_crop": 0, 1284 | "image_medium_width": 300, 1285 | "image_medium_height": 300, 1286 | "image_large_width": 1024, 1287 | "image_large_height": 1024, 1288 | "permalink_structure": "/%year%/%monthnum%/%day%/%postname%/", 1289 | "post_formats": [], 1290 | "default_post_format": "0", 1291 | "default_category": 1, 1292 | "allowed_file_types": [ 1293 | "jpg", 1294 | "jpeg", 1295 | "png", 1296 | "gif", 1297 | "pdf", 1298 | "doc", 1299 | "ppt", 1300 | "odt", 1301 | "pptx", 1302 | "docx", 1303 | "pps", 1304 | "ppsx", 1305 | "xls", 1306 | "xlsx", 1307 | "key", 1308 | "mp3", 1309 | "m4a", 1310 | "wav", 1311 | "ogg", 1312 | "zip", 1313 | "ogv", 1314 | "mp4", 1315 | "m4v", 1316 | "mov", 1317 | "wmv", 1318 | "avi", 1319 | "mpg", 1320 | "3gp", 1321 | "3g2" 1322 | ], 1323 | "show_on_front": "page", 1324 | "default_likes_enabled": true, 1325 | "default_sharing_status": true, 1326 | "default_comment_status": true, 1327 | "default_ping_status": true, 1328 | "software_version": "4.4-alpha-34640", 1329 | "created_at": "2014-03-29T19:21:20+00:00", 1330 | "wordads": false, 1331 | "publicize_permanently_disabled": false, 1332 | "page_on_front": 6, 1333 | "page_for_posts": 11 1334 | }, 1335 | "meta": { 1336 | "links": { 1337 | "self": "https://public-api.wordpress.com/rest/v1.1/sites/66336813", 1338 | "help": "https://public-api.wordpress.com/rest/v1.1/sites/66336813/help", 1339 | "posts": "https://public-api.wordpress.com/rest/v1.1/sites/66336813/posts/", 1340 | "comments": "https://public-api.wordpress.com/rest/v1.1/sites/66336813/comments/", 1341 | "xmlrpc": "https://saukvillehistory.wordpress.com/xmlrpc.php" 1342 | } 1343 | }, 1344 | "user_can_manage": true, 1345 | "is_vip": false, 1346 | "is_multisite": true, 1347 | "capabilities": { 1348 | "edit_pages": true, 1349 | "edit_posts": true, 1350 | "edit_others_posts": true, 1351 | "edit_others_pages": true, 1352 | "edit_theme_options": true, 1353 | "edit_users": false, 1354 | "list_users": true, 1355 | "manage_categories": true, 1356 | "manage_options": true, 1357 | "promote_users": true, 1358 | "publish_posts": true, 1359 | "upload_files": true, 1360 | "view_stats": true 1361 | }, 1362 | "plan": { 1363 | "product_id": 1003, 1364 | "product_slug": "value_bundle", 1365 | "product_name_short": "Premium" 1366 | }, 1367 | "single_user_site": false 1368 | }, 1369 | { 1370 | "ID": 77518545, 1371 | "name": "Stabby Today", 1372 | "description": "", 1373 | "URL": "http://stabby.today", 1374 | "jetpack": false, 1375 | "post_count": 5, 1376 | "subscribers_count": 4, 1377 | "lang": "en", 1378 | "icon": { 1379 | "img": "https://secure.gravatar.com/blavatar/4a5c689bf009cb98f0a51b08a5079b10", 1380 | "ico": "https://secure.gravatar.com/blavatar/ad6dfa91d92b36334bbcd17227b416da" 1381 | }, 1382 | "logo": { 1383 | "id": 0, 1384 | "sizes": [], 1385 | "url": "" 1386 | }, 1387 | "visible": true, 1388 | "is_private": false, 1389 | "is_following": false, 1390 | "options": { 1391 | "timezone": "", 1392 | "gmt_offset": 0, 1393 | "videopress_enabled": true, 1394 | "upgraded_filetypes_enabled": true, 1395 | "login_url": "https://stabbysite.wordpress.com/wp-login.php", 1396 | "admin_url": "https://stabbysite.wordpress.com/wp-admin/", 1397 | "is_mapped_domain": true, 1398 | "is_redirect": false, 1399 | "unmapped_url": "https://stabbysite.wordpress.com", 1400 | "featured_images_enabled": false, 1401 | "theme_slug": "pub/twentytwelve", 1402 | "header_image": false, 1403 | "background_color": "343838", 1404 | "image_default_link_type": "file", 1405 | "image_thumbnail_width": 150, 1406 | "image_thumbnail_height": 150, 1407 | "image_thumbnail_crop": 0, 1408 | "image_medium_width": 300, 1409 | "image_medium_height": 300, 1410 | "image_large_width": 1024, 1411 | "image_large_height": 1024, 1412 | "permalink_structure": "/%year%/%monthnum%/%day%/%postname%/", 1413 | "post_formats": [], 1414 | "default_post_format": "0", 1415 | "default_category": 1, 1416 | "allowed_file_types": [ 1417 | "jpg", 1418 | "jpeg", 1419 | "png", 1420 | "gif", 1421 | "pdf", 1422 | "doc", 1423 | "ppt", 1424 | "odt", 1425 | "pptx", 1426 | "docx", 1427 | "pps", 1428 | "ppsx", 1429 | "xls", 1430 | "xlsx", 1431 | "key", 1432 | "mp3", 1433 | "m4a", 1434 | "wav", 1435 | "ogg", 1436 | "zip", 1437 | "ogv", 1438 | "mp4", 1439 | "m4v", 1440 | "mov", 1441 | "wmv", 1442 | "avi", 1443 | "mpg", 1444 | "3gp", 1445 | "3g2" 1446 | ], 1447 | "show_on_front": "page", 1448 | "default_likes_enabled": true, 1449 | "default_sharing_status": true, 1450 | "default_comment_status": true, 1451 | "default_ping_status": true, 1452 | "software_version": "4.4-alpha-34640", 1453 | "created_at": "2014-10-23T12:51:12+00:00", 1454 | "wordads": false, 1455 | "publicize_permanently_disabled": false, 1456 | "page_on_front": 4, 1457 | "page_for_posts": 0 1458 | }, 1459 | "meta": { 1460 | "links": { 1461 | "self": "https://public-api.wordpress.com/rest/v1.1/sites/77518545", 1462 | "help": "https://public-api.wordpress.com/rest/v1.1/sites/77518545/help", 1463 | "posts": "https://public-api.wordpress.com/rest/v1.1/sites/77518545/posts/", 1464 | "comments": "https://public-api.wordpress.com/rest/v1.1/sites/77518545/comments/", 1465 | "xmlrpc": "https://stabbysite.wordpress.com/xmlrpc.php" 1466 | } 1467 | }, 1468 | "user_can_manage": true, 1469 | "is_vip": false, 1470 | "is_multisite": true, 1471 | "capabilities": { 1472 | "edit_pages": true, 1473 | "edit_posts": true, 1474 | "edit_others_posts": true, 1475 | "edit_others_pages": true, 1476 | "edit_theme_options": true, 1477 | "edit_users": false, 1478 | "list_users": true, 1479 | "manage_categories": true, 1480 | "manage_options": true, 1481 | "promote_users": true, 1482 | "publish_posts": true, 1483 | "upload_files": true, 1484 | "view_stats": true 1485 | }, 1486 | "plan": { 1487 | "product_id": 1003, 1488 | "product_slug": "value_bundle", 1489 | "product_name_short": "Premium" 1490 | }, 1491 | "single_user_site": true 1492 | }, 1493 | { 1494 | "ID": 60992908, 1495 | "name": "Test Site", 1496 | "description": "Smile! You’re at the best WordPress.com site ever", 1497 | "URL": "https://jinglelimejuice.wordpress.com", 1498 | "jetpack": false, 1499 | "post_count": 2, 1500 | "subscribers_count": 0, 1501 | "lang": "en", 1502 | "logo": { 1503 | "id": 0, 1504 | "sizes": [], 1505 | "url": "" 1506 | }, 1507 | "visible": true, 1508 | "is_private": false, 1509 | "is_following": false, 1510 | "options": { 1511 | "timezone": "", 1512 | "gmt_offset": 0, 1513 | "videopress_enabled": false, 1514 | "upgraded_filetypes_enabled": false, 1515 | "login_url": "https://jinglelimejuice.wordpress.com/wp-login.php", 1516 | "admin_url": "https://jinglelimejuice.wordpress.com/wp-admin/", 1517 | "is_mapped_domain": false, 1518 | "is_redirect": false, 1519 | "unmapped_url": "https://jinglelimejuice.wordpress.com", 1520 | "featured_images_enabled": false, 1521 | "theme_slug": "pub/twentytwelve", 1522 | "header_image": false, 1523 | "background_color": false, 1524 | "image_default_link_type": "file", 1525 | "image_thumbnail_width": 150, 1526 | "image_thumbnail_height": 150, 1527 | "image_thumbnail_crop": 0, 1528 | "image_medium_width": 300, 1529 | "image_medium_height": 300, 1530 | "image_large_width": 1024, 1531 | "image_large_height": 1024, 1532 | "permalink_structure": "/%year%/%monthnum%/%day%/%postname%/", 1533 | "post_formats": [], 1534 | "default_post_format": "0", 1535 | "default_category": 1, 1536 | "allowed_file_types": [ 1537 | "jpg", 1538 | "jpeg", 1539 | "png", 1540 | "gif", 1541 | "pdf", 1542 | "doc", 1543 | "ppt", 1544 | "odt", 1545 | "pptx", 1546 | "docx", 1547 | "pps", 1548 | "ppsx", 1549 | "xls", 1550 | "xlsx", 1551 | "key" 1552 | ], 1553 | "show_on_front": "posts", 1554 | "default_likes_enabled": true, 1555 | "default_sharing_status": true, 1556 | "default_comment_status": true, 1557 | "default_ping_status": true, 1558 | "software_version": "4.4-alpha-34640", 1559 | "created_at": "2013-11-26T15:00:53+00:00", 1560 | "wordads": false, 1561 | "publicize_permanently_disabled": false 1562 | }, 1563 | "meta": { 1564 | "links": { 1565 | "self": "https://public-api.wordpress.com/rest/v1.1/sites/60992908", 1566 | "help": "https://public-api.wordpress.com/rest/v1.1/sites/60992908/help", 1567 | "posts": "https://public-api.wordpress.com/rest/v1.1/sites/60992908/posts/", 1568 | "comments": "https://public-api.wordpress.com/rest/v1.1/sites/60992908/comments/", 1569 | "xmlrpc": "https://jinglelimejuice.wordpress.com/xmlrpc.php" 1570 | } 1571 | }, 1572 | "user_can_manage": true, 1573 | "is_vip": false, 1574 | "is_multisite": true, 1575 | "capabilities": { 1576 | "edit_pages": true, 1577 | "edit_posts": true, 1578 | "edit_others_posts": true, 1579 | "edit_others_pages": true, 1580 | "edit_theme_options": true, 1581 | "edit_users": false, 1582 | "list_users": true, 1583 | "manage_categories": true, 1584 | "manage_options": true, 1585 | "promote_users": true, 1586 | "publish_posts": true, 1587 | "upload_files": true, 1588 | "view_stats": true 1589 | }, 1590 | "plan": { 1591 | "product_id": 1, 1592 | "product_slug": "free_plan", 1593 | "product_name_short": "Free" 1594 | }, 1595 | "single_user_site": true 1596 | } 1597 | ] 1598 | } -------------------------------------------------------------------------------- /test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export LC_CTYPE="en_US.UTF-8" 3 | 4 | echo "- Building WordPressComKit" 5 | 6 | set -o pipefail && 7 | xcodebuild -workspace 'WordPressComKit.xcworkspace' \ 8 | -scheme 'WordPressComKit' \ 9 | clean build test \ 10 | -sdk iphonesimulator \ 11 | -destination 'platform=iOS Simulator,name=iPhone 6,OS=latest' \ 12 | CODE_SIGNING_REQUIRED=NO \ 13 | CODE_SIGN_IDENTITY= \ 14 | PROVISIONING_PROFILE= | \ 15 | tee ./xcode_raw_build.log | \ 16 | xcpretty --color --report junit --output ./xcode/results_unit.xml 17 | --------------------------------------------------------------------------------