Skip to content

Commit

Permalink
Add AppStoreVersion support and Build attributes and relationships
Browse files Browse the repository at this point in the history
  • Loading branch information
ppawlak committed Feb 9, 2021
1 parent d486650 commit fa7ff93
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions appstoreconnect/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ def type_name(self):
def endpoint(self):
pass

@property
@abstractmethod
def attributes(self):
pass

@property
@abstractmethod
def relationships(self):
pass


# Beta Testers and Groups

Expand Down Expand Up @@ -86,6 +96,24 @@ class App(Resource):
documentation = 'https://developer.apple.com/documentation/appstoreconnectapi/app'


class AppStoreVersion(Resource):
endpoint = '/v1/apps/{id}/appStoreVersions'
type = 'appStoreVersions'
attributes = ['platform', 'appStoreState', 'copyright', 'earliestReleaseDate', 'releaseType', 'usesIdfa', 'versionString', 'createdDate', 'downloadable']
relationships = {
'app': {'multiple': False},
'ageRatingDeclaration': {'multiple': False},
'appStoreReviewDetail': {'multiple': False},
'appStoreVersionLocalizations': {'multiple': False},
'appStoreVersionPhasedRelease': {'multiple': False},
'appStoreVersionSubmission': {'multiple': False},
'build': {'multiple': False},
'idfaDeclaration': {'multiple': False},
'routingAppCoverage': {'multiple': False},
}
documentation = 'https://developer.apple.com/documentation/appstoreconnectapi/appstoreversion'


class PreReleaseVersion(Resource):
endpoint = '/v1/preReleaseVersions'
type = 'preReleaseVersion'
Expand Down Expand Up @@ -119,6 +147,18 @@ class BetaLicenseAgreement(Resource):
class Build(Resource):
endpoint = '/v1/builds'
type = 'builds'
attributes = ['expired', 'iconAssetToken', 'minOsVersion', 'processingState', 'version', 'usesNonExemptEncryption', 'uploadedDate', 'expirationDate']
relationships = {
'app': {'multiple': False},
'appEncryptionDeclaration': {'multiple': False},
'individualTesters': {'multiple': True},
'preReleaseVersion': {'multiple': False},
'betaBuildLocalizations': {'multiple': True},
'buildBetaDetail': {'multiple': False},
'betaAppReviewSubmission': {'multiple': False},
'appStoreVersion': {'multiple': False},
'icons': {'multiple': True},
}
documentation = 'https://developer.apple.com/documentation/appstoreconnectapi/build/attributes'


Expand Down

0 comments on commit fa7ff93

Please sign in to comment.