Metadata-Version: 1.1
Name: beans
Version: 1.0.1
Summary: The Python client library for the Beans API
Home-page: https://github.com/loyalbeans/Beans-SDK-Python
Author: Beans
Author-email: contact@loyalbeans.com
License: Apache
Download-URL: https://github.com/loyalbeans/Beans-SDK-Python/tarball/v1.0.1
Description: Beans-SDK-Python
        ================
        
        [Beans](http://loyalbeans.com) SDK allows you to easily integrate a loyalty program in your application.
        
        Install
        -------
        
        We recommend installing with pip.
        ```sh
        pip install beans
        ```
        
        Usage
        -----
        
        Beans SDK needs [Beans Plugin](http://business.loyalbeans.com/developers) in order to correctly work.
        
        The following is the syntax for making API requests:
        ```python
        import beans
        
        # Initialize the API
        beans.initialize('SECRET_KEY')
        
        beans.business.call(function='[module]/[action]/', [params], [cookies])
        ```
        - [module] : The module to call, e.g. reward. [Module list](http://business.loyalbeans.com/doc/introduction/)
        - [action] : Each module supports multiple actions such as add or get.
        - [cookies]: cookies associated to the request
        - [params] : Arguments as dictionary (optional)
        
        A secret key is required for using the SDK. To get a secret key,  need to have a Business account on [Beans](http://business.loyalbeans.com).
        
        
        Example and error handling
        --------------------------
        
        ```python
        # Check if the user possess your card
        is_beans_card = beans.business.call(function='card/check/', cookies=request.cookies)
        
        # Add 1000 beans point to the user card
        if is_beans_card:
        	try:
        	    arg = {'beans': 1000}
        		beans.business.call('beans/add/',params=arg, cookies=cookies)
        	except beans.BeansException as e:
        	    print(e)
        ```
        
        Here is the [List of API methods](http://business.loyalbeans.com/page/api_doc/)
        
        Python Version Supported
        - 2.7
        - 3.3
        - 3.4
Platform: UNKNOWN
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
