I am trying to build my own endpoints inside of an App Engine Application. There is an endpoint API that needs to ask user for "https://www.googleapis.com/auth/drive.readonly" scope. It performs a list of the Drive API and scan the drive file of that user.
The problem is that I don't know how to make call to Drive api inside of an endpoint API.
I think inside of the endpoint method, it has the credentials we got from the user. But I don't know how to receive that.
I am using python as the backend language.
@drivetosp_test_api.api_class(resource_name='report')
class Report(remote.Service):
@endpoints.method(EmptyMessage, EmptyMessage,
name='generate',
path='report/generate',
http_method='GET'
)
def report_generate(self, request):
logging.info(endpoints)
return EmptyMessage()