Skip to content

Commit 0977151

Browse files
committed
ReadMe: also outlie output structure on failed requests
1 parent c440e37 commit 0977151

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,19 @@ Array
141141
)
142142
```
143143

144+
On failure, the result looks like this:
145+
146+
```
147+
Array
148+
(
149+
[success] => 0
150+
[message] => HTTP/1.0 404 Not Found
151+
)
152+
```
153+
154+
The message most often is the "server response" – but could also be something like `'No app data found'` if server response indicated success but the results were not parsable.
155+
156+
144157
### Obtaining app permissions
145158
Using `$google->parsePerms($packageName)` you can obtain permissions for a given app. As with the structures returned for apps, the keys `success` and `message` are used to indicate the status. For data itself, you'll find a list by permission groups behind the `grouped` key – and "unified permissions" behind the `perms` key. Example output:
146159

@@ -208,6 +221,8 @@ Array
208221

209222
The `grouped` keys are the IDs given to the permission groups by Google. The empty `[0]` key for permissions in the `grouped` tree is as shipped by Google; no idea what it is reserved for until some values show up here.
210223

224+
For results on failure, please see above.
225+
211226

212227
### TODO
213228

0 commit comments

Comments
 (0)