This repository has been archived by the owner on Nov 19, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added automatic paging for all resources and added tests
- Loading branch information
Showing
5 changed files
with
162 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{ | ||
"creationTimestamp": "2015-05-24T16:37:32Z", | ||
"resultCode": 0, | ||
"userLocale": "en_US", | ||
"protocolVersion": "QH65B2", | ||
"requestId": null, | ||
"requestUrl": "https://developer.apple.com:443//services-account/QH65B2/account/ios/device/listDevices.action", | ||
"responseId": "881a1f34-bc13-425b-ae18-9f4f8fb40aaa", | ||
"isAdmin": true, | ||
"isMember": false, | ||
"isAgent": true, | ||
"pageNumber": 1, | ||
"pageSize": 8, | ||
"totalRecords": 9, | ||
"httpResponseHeaders": null, | ||
"devices": [{ | ||
"deviceId": "9T5RA84AAA", | ||
"name": "Felix Krause's iPhone 6", | ||
"deviceNumber": "aaabbbccccddddaaabbb", | ||
"devicePlatform": "ios", | ||
"status": "c" | ||
}, { | ||
"deviceId": "L4378H2AAA", | ||
"name": "Felix's iPad", | ||
"deviceNumber": "aaabbbccccddddaaabbb", | ||
"devicePlatform": "ios", | ||
"status": "c" | ||
}, { | ||
"deviceId": "LEL449RAAA", | ||
"name": "4s", | ||
"deviceNumber": "aaabbbccccddddaaabbb", | ||
"devicePlatform": "ios", | ||
"status": "c" | ||
}, { | ||
"deviceId": "S4227Y4AAA", | ||
"name": "Simon iOS", | ||
"deviceNumber": "aaabbbccccddddaaabbb", | ||
"devicePlatform": "ios", | ||
"status": "c" | ||
}, { | ||
"deviceId": "5YTNZ5AAAA", | ||
"name": "iPhone 4S", | ||
"deviceNumber": "aaabbbccccddddaaabbb", | ||
"devicePlatform": "ios", | ||
"status": "c" | ||
}, { | ||
"deviceId": "WXQ7V239BE", | ||
"name": "iPhone 4s", | ||
"deviceNumber": "aaabbbccccddddaaabbb", | ||
"devicePlatform": "ios", | ||
"status": "c" | ||
}, { | ||
"deviceId": "9K3WR66AAA", | ||
"name": "MyName", | ||
"deviceNumber": "aaabbbccccddddaaabbb", | ||
"devicePlatform": "ios", | ||
"status": "c" | ||
}, { | ||
"deviceId": "GD25LDGAAA", | ||
"name": "iPhonekajsdf", | ||
"deviceNumber": "aaabbbccccddddaaabbb", | ||
"devicePlatform": "ios", | ||
"status": "c" | ||
}] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"creationTimestamp": "2015-05-24T16:37:33Z", | ||
"resultCode": 0, | ||
"userLocale": "en_US", | ||
"protocolVersion": "QH65B2", | ||
"requestId": null, | ||
"requestUrl": "https://developer.apple.com:443//services-account/QH65B2/account/ios/device/listDevices.action", | ||
"responseId": "558ba377-d979-45c6-b2f8-ee6d2d692aaa", | ||
"isAdmin": true, | ||
"isMember": false, | ||
"isAgent": true, | ||
"pageNumber": 2, | ||
"pageSize": 8, | ||
"totalRecords": 9, | ||
"httpResponseHeaders": null, | ||
"devices": [{ | ||
"deviceId": "XJXGVS4AAAA", | ||
"name": "The last phone", | ||
"deviceNumber": "4c24a7ee5c8674847f49b4fb2d87483053faaaaa", | ||
"devicePlatform": "ios", | ||
"status": "c" | ||
}] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d594c09
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is missing on the provisioning profiles which is most likely to have a high number. Testing out a fix based on your commit.
d594c09
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very old commit. What do you mean?
d594c09
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean you set up pagination on most of the objects, but forgot to paginate the provisioning profiles which for us has the most items.
Might also be related to: fastlane/fastlane#4280
We are working on a pull request for you, but here is the working local code for the provisioning profiles method:
`def provisioning_profiles(include_invalid_profiles=true, mac: false)
@page_size = 30
paging do |page_number|
puts "provisioning profiles page '#{page_number}'..."
req = request(:post) do |r|
r.url "https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(mac)}/listProvisio..."
r.params = {
teamId: team_id,
includeInactiveProfiles: include_invalid_profiles,
onlyCountLists: true,
pageSize:page_size,
pageNumber:page_number,
sidx: "name",
sort: "name=dasc"
}
end
parse_response(req, 'provisioningProfiles')
end
end`
Note: For us the default page size of 500 did not work, we had to back it down to < 200.