I highly recommend going with the last approach. With the last
approach you can pass around objects in proper OOP fashion. This will
be familiar to most contributors to your project and most devs that
you hire.
foo = api.customers(1)
if bar==baz:
foo.update(Name='Leroy')
else:
foo.delete(
Le dim. 28 avr. 2019 à 20:58, Jonathan Leroy - Inikup
a écrit :
> Which of the following syntax do you expect an API client library to
> use, and why?
Thank you all for your feedbacks!
I will go with #2.
Le lun. 29 avr. 2019 à 05:43, DL Neil a écrit :
> Doesn't the framework you are using have
On 30/04/2019 09.52, Peter Otten wrote:
> Thomas Jollans wrote:
>
>> On 29/04/2019 09.18, Peter Otten wrote:
>>> Jonathan Leroy - Inikup via Python-list wrote:
>>> alice.name = "Bob" # __setattr__
>>>
>>> del customers[42] # __delitem__
>>
>> do you want this sort of thing to update the upstream
Thomas Jollans wrote:
> On 29/04/2019 09.18, Peter Otten wrote:
>> Jonathan Leroy - Inikup via Python-list wrote:
>>
>>> Hi all,
>>>
>>> I'm writing a client library for a REST API. The API endpoints looks
>>> like this: /customers
>>> /customers/1
>>> /customers/1/update
>>> /customers/1/delete
On 29/04/2019 09.18, Peter Otten wrote:
> Jonathan Leroy - Inikup via Python-list wrote:
>
>> Hi all,
>>
>> I'm writing a client library for a REST API. The API endpoints looks like
>> this: /customers
>> /customers/1
>> /customers/1/update
>> /customers/1/delete
>>
>> Which of the following synta
Jonathan Leroy - Inikup via Python-list wrote:
> Hi all,
>
> I'm writing a client library for a REST API. The API endpoints looks like
> this: /customers
> /customers/1
> /customers/1/update
> /customers/1/delete
>
> Which of the following syntax do you expect an API client library to
> use, and
On 29 Apr 2019 07:18, DL Neil wrote:
On 29/04/19 4:52 PM, Chris Angelico wrote:
> On Mon, Apr 29, 2019 at 2:43 PM DL Neil
> wrote:
>>
>> On 29/04/19 3:55 PM, Chris Angelico wrote:
>>> On Mon, Apr 29, 2019 at 1:43 PM DL Neil
>>> wrote:
Well, seeing you ask: a more HTTP-ish approach *mi
On 29/04/19 4:52 PM, Chris Angelico wrote:
On Mon, Apr 29, 2019 at 2:43 PM DL Neil wrote:
On 29/04/19 3:55 PM, Chris Angelico wrote:
On Mon, Apr 29, 2019 at 1:43 PM DL Neil wrote:
Well, seeing you ask: a more HTTP-ish approach *might* be:
api.update.customer( 1, name='Bob' )
ie
api.verb.s
On Mon, Apr 29, 2019 at 2:43 PM DL Neil wrote:
>
> On 29/04/19 3:55 PM, Chris Angelico wrote:
> > On Mon, Apr 29, 2019 at 1:43 PM DL Neil
> > wrote:
> >> Well, seeing you ask: a more HTTP-ish approach *might* be:
> >>
> >> api.update.customer( 1, name='Bob' )
> >>
> >> ie
> >> api.verb.subject(
On 29/04/19 3:55 PM, Chris Angelico wrote:
On Mon, Apr 29, 2019 at 1:43 PM DL Neil wrote:
Well, seeing you ask: a more HTTP-ish approach *might* be:
api.update.customer( 1, name='Bob' )
ie
api.verb.subject( adjectives and adverbs )
Thus:
api_label/intro/ID.what_we're_going_to_do.who/what_we'
On Mon, Apr 29, 2019 at 1:43 PM DL Neil wrote:
> Well, seeing you ask: a more HTTP-ish approach *might* be:
>
> api.update.customer( 1, name='Bob' )
>
> ie
> api.verb.subject( adjectives and adverbs )
>
> Thus:
> api_label/intro/ID.what_we're_going_to_do.who/what_we'll_do_it_to(
> customerID, supp
On 29/04/19 6:58 AM, Jonathan Leroy - Inikup via Python-list wrote:
1/
api.customers_list()
api.customers_info(1)
api.customers_update(1, name='Bob')
api.customers_delete(1)
Dislike this because it mixes point and underscore - easy to mistake!
2/
api.customers.list()
api.customers.info(1)
ap
On Mon, Apr 29, 2019 at 11:44 AM Jonathan Leroy - Inikup via
Python-list wrote:
>
> Hi all,
>
> I'm writing a client library for a REST API. The API endpoints looks like
> this:
> /customers
> /customers/1
> /customers/1/update
> /customers/1/delete
>
> Which of the following syntax do you expect
Hi all,
I'm writing a client library for a REST API. The API endpoints looks like this:
/customers
/customers/1
/customers/1/update
/customers/1/delete
Which of the following syntax do you expect an API client library to
use, and why?
1/
api.customers_list()
api.customers_info(1)
api.customers_u
14 matches
Mail list logo