Skip to content

Commit

Permalink
Merge pull request #26 from Ephraim-Akolo/update-readme
Browse files Browse the repository at this point in the history
Update readme
  • Loading branch information
Ephraim-Akolo authored Aug 19, 2024
2 parents 158963a + b85248c commit 7e2beed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

## Overview

`easymobile` is a Python package that provides a simple interface for integrating with the EASYMOBILE API, allowing users to purchase airtime, data, cable subscriptions etc. This package is designed to streamline the process of interacting with the EASYMOBILE API and offers methods to handle various operations such as fetching available services, purchasing services, and checking transaction statuses.
`easymobile` is a Python package that provides a simple interface for integrating with the EASYMOBILE API, allowing users to purchase airtime, data, cable subscriptions etc. This package is designed to streamline the process of interacting with the [EasyMobile API](https://b2b.eazymobile.ng/api/developer/v1/documentation/start#) and offers methods to handle various operations such as fetching available services, purchasing services, and checking transaction statuses.


## Available Features
## Available Operations

- Account Operations
- Airtime Operations
- Data Operations
- Cable Operations
Expand All @@ -29,7 +30,7 @@ pip install git+https://github.com/Ephraim-Akolo/EASYMOBILE.git

### Initialization

To use the EASYMOBILE package, you need to initialize the classes with your API key. The API key can be provided during initialization or set in the environmental variable `EASYMOBILE_API_KEY`.
To use the EASYMOBILE package, you need to initialize the classes with your API key. The API key can be provided during initialization or set in the environmental variable `EASYMOBILE_API_KEY`. Timeout for the requests to the easymobile API can be set on class initialization or by setting the `EASYMOBILE_TIMEOUT` environmental variable.

### Account Operations

Expand Down
6 changes: 4 additions & 2 deletions easymobile/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from .mocked import MockedRequests

API_KEY = os.getenv('EASYMOBILE_API_KEY')
TIMEOUT = os.getenv('EASYMOBILE_TIMEOUT')


class EasyBase:
"""
Expand All @@ -22,8 +24,8 @@ def __init__(self, api_key: str = None, timeout: float = None) -> None:
"""
Initialize the EasyB2B object.
"""
if timeout:
self.timeout = timeout
if timeout or TIMEOUT:
self.timeout = timeout or float(TIMEOUT)

self.req_session = requests.session()
self.req_session.headers['Content-Type'] = 'application/json'
Expand Down

0 comments on commit 7e2beed

Please sign in to comment.