mailjet Python APIを使用していますが、少し混乱しています。
https://www.mailjet.com/docs/api/lists/contacts
このAPIクラスを使用してmailjetsのGETメソッドを呼び出すことさえ可能ではないようです。誰かがこれが事実であることを確認できますか?
api.lists.Contacts(id='foo') # causes POST, thus 405
これが彼らのAPIクラスです。クラスApiMethodFunction
にオプションを渡すことすら見ていません。connection
class ApiMethod(object):
def __init__(self, api, method):
self.api = api
self.method = method
def __getattr__(self, function):
return ApiMethodFunction(self, function)
def __unicode__(self):
return self.method
class ApiMethodFunction(object):
def __init__(self, method, function):
self.method = method
self.function = function
def __call__(self, **kwargs):
response = self.method.api.connection.open(
self.method,
self.function,
postdata=kwargs,
)
return json.load(response)
def __unicode__(self):
return self.function
それは重要な機能のように思われるので、私はそれを間違って使用していると思う傾向がありますが、それは可能でしょうか?
id
GETパラメータで必要な場合、連絡先をどのようにリストすることになっていますか?