enverus-ea / enverus-developer-api

Enverus Developer API Python Client
MIT License
19 stars 16 forks source link

Cannot get next Link #6

Closed RobSB2 closed 2 years ago

RobSB2 commented 3 years ago

I am unable to get links using the V3 API call.

link=d3.Link('production',DeletedDate='null',ProducingMonth='ge('+ProdYear+'-01-01)',API_UWI_14_Unformatted='btw('+ApiFrom+'000000000000,'+ApiTo+'000000000000)') print(link) sys.exit()

Error:

link=d3.Link('production',DeletedDate='null',ProducingMonth='ge('+ProdYear+'-01-01)',API_UWI_14_Unformatted='btw('+ApiFrom+'000000000000,'+ApiTo+'000000000000)') AttributeError: 'DeveloperAPIv3' object has no attribute 'Link'

Second attempt:

link=d3.links('production',DeletedDate='null',ProducingMonth='ge('+ProdYear+'-01-01)',API_UWI_14_Unformatted='btw('+ApiFrom+'000000000000,'+ApiTo+'000000000000)') print(link) sys.exit()

Error: Traceback (most recent call last): File "D:\Python\v3_ScratchFile.py", line 67, in main() File "D:\Python\v3_ScratchFile.py", line 47, in main link=d3.links('production',DeletedDate='null',ProducingMonth='ge('+ProdYear+'-01-01)',API_UWI_14_Unformatted='btw('+ApiFrom+'000000000000,'+ApiTo+'000000000000)') TypeError: 'NoneType' object is not callable

henkhaus commented 2 years ago

@RobSB2

links is a class variable, not a method. Try this:

for row in d3.query('rigs', deleteddate='null', pagesize=1):
    print(d3.links)