A library for interacting with RapLeaf's Personalization API
Project description
Copyright 2010 Rapleaf
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
For general information regarding the personalization API, visit http://www.rapleaf.com/developers/api_docs/personalization/direct. The personalization API’s terms and conditions are stated at http://www.rapleaf.com/developers/api_usage.
How to Use
Installation
easy_install rapleafApi
Usage
>>> from rapleafApi import RapleafApi >>> api = RapleafApi.RapleafApi('API_KEY') >>> api.query_by_email('test@example.com') {u'gender': u'Male', u'age': u'25-34'}
Query Options
The egg supports several ways to query Rapleaf’s API: email, hashed email (either MD5 or SHA1 hash), name and postal (NAP), or name and ZIP+4 (NAZ).
query_by_email(self, email, hash_email = False, show_available = False)
query_by_nap(self, first, last, street, city, state, email = None, show_available = False)
query_by_naz(self, first, last, zip4, email = None, show_available = False)
Contributing
If you have suggestions or patches, feel free to email us at <developer at rapleaf dot com>. We look forward to hearing from you!
Contributors
Nicole Allard <nicole at rapleaf dot com>
Dependencies
urllib3
easy_install urllib3
or visit the url https://github.com/shazow/urllib3/zipball/master. Once you’ve unzipped the download, open a terminal window and navigate to the folder into which you unzipped the download. When you open the folder, one of the subdirectories is ‘urllib3.’ Open it. It contains a script called setup.py which you’ll run via the command ‘python setup.py install’.
Note that, on unsuccessful requests, we raise an error. Unsuccessful requests are any requests which send back an http response status outside of the range 200 <= status < 300.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file RapLeafApi-0.1.1.tar.gz
.
File metadata
- Download URL: RapLeafApi-0.1.1.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e26293ef1851fa4633fb077c7e0a5ca5e04275a99e04df25dee427f9a87d145 |
|
MD5 | c1c991a2d70506d4c787368f452bc52a |
|
BLAKE2b-256 | c29f33f4162f5a9862976febab80246d69b0338c4be1491d696b917611a18e0c |