Comments (8)
I hacked around it by doing this:
def _search_contact_name(xero, name):
def _filter(*args, **kwargs):
uri, params, method, body, headers, singleobject = xero.contacts._filter(*args, **kwargs)
params = {'where': 'Name.ToLower()=="%s"' % name.lower()}
return uri, params, method, body, headers, singleobject
return xero.contacts._get_data(_filter)()
Perhaps there could be a official solution which offers direct access to the where parameter.
from pyxero.
I just saw there's a long standing pull request on this waiting to be accepted by the "powers that be":
from pyxero.
I support a .raw() method if you want to provide a patch
from pyxero.
Would it look like this?
def _raw(self, params, headers=None):
uri = '/'.join([self.base_url, self.name])
return uri, params, 'get', None, headers, False
from pyxero.
I would expect the userland syntax to be .filter(raw='xxx') or .rawfilter() maybe
from pyxero.
You mean to enhance the existing filter? What about just allowing a 'where' argument to be added to filter to override generating inside the filter from the other kwargs?
from pyxero.
Yeah I was thinking it could be used to supplement, I think if we add it to the end at least the behaviour is consistent and can be documented.
from pyxero.
This is now implemented via filter(raw='Contact.Name.ToLower().Contains("abc")')
from pyxero.
Related Issues (20)
- Filter based on not equals null for balances HOT 1
- Access raw request/response for both OAuth methods
- Validation Exception for creating quotes. HOT 1
- HasAccount validation error on payments.save HOT 1
- XERO Delete connection with connection id HOT 1
- XeroForbidden: FilesManager submits incorrect request for OAuth2 HOT 1
- Can see invoice tracking categories HOT 1
- Response 429 Rate limit exceeded handling
- Example for machine-to-machine implementation HOT 2
- PKCE Authentication HOT 5
- Get Organisation's Actions
- Binary file attachment issue HOT 3
- When XeroRateLimitExceeded is thrown the limit that was exceeded is not included in output
- Idempotency keys
- XeroAccessDenied error raised while verifying redirected URI from Xero in Localhost HOT 1
- Document how to connect to xero HOT 1
- Bad error handling in filtering HOT 1
- pypi version severely outdated HOT 2
- Add some caching functionality to minimize the APIs usage HOT 3
- Deleting invoice raises XeroNotFound
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyxero.