Skip to content

Commit

Permalink
Fixed Readme. Fix googleapis#219
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro Casanovas committed Mar 31, 2019
1 parent d45e78b commit a9022d7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,12 @@ class CustomClass(ApiComponent):
_endpoints = {'my_url_key': '/customendpoint'}

def __init__(self, *, parent=None, con=None, **kwargs):
super().__init__(parent=parent, con=con, **kwargs)
# connection is only needed if you want to communicate with the api provider
self.con = parent.con if parent else con
protocol = parent.protocol
main_resource = parent.main_resource

super().__init__(protocol=protocol, main_resource=main_resource)
# ...

def do_some_stuff(self):
Expand Down

0 comments on commit a9022d7

Please sign in to comment.