Permalink
Browse files

minor formatting and whitespace changes

  • Loading branch information...
1 parent 0e46e87 commit 59fdfbb22719bf6dba7140fda89e3d28365c9ddc @kanzure kanzure committed Jul 12, 2012
Showing with 29 additions and 48 deletions.
  1. +1 −2 androidmarket.py
  2. +5 −5 examples.py
  3. +23 −41 market_proto.py
View
@@ -94,7 +94,6 @@ def setAuthSubToken(self, authSubToken):
self.context.authSubToken = authSubToken
self.authSubToken = authSubToken
-
def login(self, email, password, accountType = ACCOUNT_TYPE_HOSTED_OR_GOOGLE):
params = {"Email": email, "Passwd": password, "service": self.SERVICE,
"accountType": accountType}
@@ -210,7 +209,7 @@ def getSubCategories(self, apptype):
if rg.HasField("subCategoriesResponse"):
for cat in rg.subCategoriesResponse.category:
retlist.append(self._toDict(cat))
- return retlist
+ return retlist
if __name__ == "__main__":
print "No command line interface available, yet."
View
@@ -7,20 +7,20 @@
# Start a new session and login
session = MarketSession()
session.login("user@gmail.com", "password")
-
+
# Search for "bankdroid" on the market and print the first result
results = session.searchApp("bankdroid")
if len(results) == 0:
print "No results found"
exit()
-
+
app = results[0]
pprint(app)
-
+
# Print the last two comments for the app
results = session.getComments(app["id"])
pprint(results[:2])
-
+
# Download and save the first screenshot
data = session.getImage(app["id"])
f = open("screenshot.png", "wb")
@@ -32,7 +32,7 @@
f = open("icon.png", "wb")
f.write(data)
f.close()
-
+
# Get all the categories and subcategories
results = session.getCategories()
pprint(results)
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 59fdfbb

Please sign in to comment.