mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2025-12-29 23:55:52 +01:00
chore(manually_added): Add support for adding unlisted APIs
The photoslibrary API is not listed however is still available. This adds a method of manually adding APIs to the shared.yaml and adds the photoslibary API info. Fixes #198
This commit is contained in:
@@ -29,6 +29,10 @@ api:
|
||||
- slides
|
||||
# invalid code generation - syntax error
|
||||
- poly
|
||||
manually_added:
|
||||
- name: photoslibrary
|
||||
version: v1
|
||||
discovery_rest_url: https://photoslibrary.googleapis.com/$discovery/rest?version=v1
|
||||
terms:
|
||||
# how to actually do something with the API
|
||||
action: doit
|
||||
|
||||
@@ -22,6 +22,14 @@
|
||||
|
||||
discovery_url = 'https://www.googleapis.com/discovery/v1/'
|
||||
apis = json.loads(urllib2.urlopen(discovery_url + "apis").read())
|
||||
|
||||
for manualy_api in api.get('manually_added', list()):
|
||||
apis['items'].append({
|
||||
'name': manualy_api['name'],
|
||||
'version': manualy_api['version'],
|
||||
'discoveryRestUrl': manualy_api['discovery_rest_url']
|
||||
})
|
||||
|
||||
json_api_targets = []
|
||||
|
||||
suffix = make.target_suffix
|
||||
|
||||
Reference in New Issue
Block a user