Skip to content

Next Version TODOs

Jakub Filak edited this page Aug 13, 2019 · 3 revisions

create_entity() accepts entity properties

Current:

create_request = northwind.entity_sets.Employees.create_entity()
create_request.set(**employee_data)

Proposed:

create_request = northwind.entity_sets.Employees.create_entity(**employee_data)

get rid of the need to access entity set proxies via the member entity_sets

Current:

data = client.entity_sets.Releases.get_entities().select('releaseId,releaseName,releaseType').execute()

Proposed:

data = client.Releases.get_entities().select('releaseId,releaseName,releaseType').execute()

the entity set proxy acts as a request (get rid of get_entities)

Current:

data = client.entity_sets.Releases.get_entities().select('releaseId,releaseName,releaseType').execute()

Proposed:

data = client.entity_sets.Releases.select('releaseId,releaseName,releaseType').execute()

get rid of the need to access function imports via the functions member

Current:

products = northwind.functions.GetProductsByRating.parameter('rating', 16).execute()

Proposed:

products = northwind.GetProductsByRating.parameter('rating', 16).execute()

the function import proxy acts as a request

Current:

products = northwind.functions.GetProductsByRating.parameter('rating', 16).execute()

Proposed:

products = northwind.functions.GetProductsByRating(rating=16).execute()

the entity set proxy is callable and returns entity (get rid of get_entity)

Current:

customer = client.entity_sets.Customers.get_entity('ALFKI').execute()

Proposed:

customer = client.entity_sets.Customers('ALFKI').execute()

the entity set proxy's execute accepts query parameters

Current:

client.entity_sets.Employees.get_entities().select('City,Orders').filter("Country eq 'USA'").expand('Orders').execute()

Proposed:

client.entity_sets.Employees.get_entities().execute(select='City,Orders', filter="Country eq 'USA'", expand='Orders')