Skip to content

Commit

Permalink
renaming things to match library name
Browse files Browse the repository at this point in the history
  • Loading branch information
pfairfax1 committed Oct 15, 2019
1 parent 1f5f88a commit 869cde1
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ install:
- pip install pytest-cov pytest-sugar responses flake8

script:
- flake8 setup.py bwapi tests --exit-zero
- pytest -vv --cov=bwapi
- flake8 setup.py bcr-api tests --exit-zero
- pytest -vv --cov=bcr_api

2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ pytest-cov = "*"
pytest-sugar = "*"

[packages]
bcr = {editable = true,path = "."}
bcr-api = {editable = true,path = "."}
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
[![Build Status](https://travis-ci.com/BrandwatchLtd/api_sdk.svg?branch=master)](https://travis-ci.com/BrandwatchLtd/api_sdk)
[![Build Status](https://travis-ci.com/BrandwatchLtd/bcr-api.svg?branch=master)](https://travis-ci.com/BrandwatchLtd/bcr-api)

# Brandwatch API SDK
# Brandwatch Consumer Research API Client

## Introduction

The Brandwatch API SDK was designed to address many of the challenges involved in building complex applications which interact with RESTful API's in general and Brandwatch's Consumer Research API, in particular:
The Brandwatch Consumer Research API Client was designed to address many of the challenges involved in building complex applications which interact with RESTful API's in general and Brandwatch's Consumer Research API, in particular:

- The SDK's object hierarchy roughly mirrors the API's resource hierarchy, making the code intuitive for those familiar with the Brandwatch Consumer Research platform
- The object hierarchy roughly mirrors the API's resource hierarchy, making the code intuitive for those familiar with the Brandwatch Consumer Research platform
- All required parameters are enforced, and most optional parameters are supported and documented
- Typical workflows are supported behind the scenes; for instance, one can validate, upload, and backfill a query with a single function call
- The SDK is designed to support simple and readable code: sensible defaults are chosen for rarely used parameters and all resource IDs are handled behind the scenes
- The library is designed to support simple and readable code: sensible defaults are chosen for rarely used parameters and all resource IDs are handled behind the scenes

From the user's perspective, the basic structure of the SDK is as follows. One first creates an instance of the class `BWProject`; this class handles authentication (via a user name and password or API key) and keeps track of project-level data such as the project's ID. (Behind the scenes, the user-level operations are handled by the class `BWUser` from which `BWProject` is inherited.) One passes `BWProject` instance as an argument in the constructor for a series of classes which manage the various Brandwatch resources: queries, groups, tags, categories, etc. These resource classes manage all resource-level operations: for example a single `BWQueries` instance handles all HTTP requests associated with queries in its attached project.
From the user's perspective, the basic structure of the library is as follows. One first creates an instance of the class `BWProject`; this class handles authentication (via a user name and password or API key) and keeps track of project-level data such as the project's ID. (Behind the scenes, the user-level operations are handled by the class `BWUser` from which `BWProject` is inherited.) One passes `BWProject` instance as an argument in the constructor for a series of classes which manage the various Brandwatch resources: queries, groups, tags, categories, etc. These resource classes manage all resource-level operations: for example a single `BWQueries` instance handles all HTTP requests associated with queries in its attached project.

## Installation

Be sure to install the latest version of Python 3.x. You can install bcr on your machine by running the following command:
Be sure to install the latest version of Python 3.x. You can install the library on your machine by running the following command:

`pip install bcr`
`pip install bcr-api`

This allows you to run scripts that import bwproject or bwresources from anywhere on your computer.

## Examples

Please see the Jupyter notebook DEMO.ipynb for examples. This notebook was built as a beginner's guide to using the Brandwatch API SDK, so it has example code, as well as detailed instructions for use.
Please see the Jupyter notebook DEMO.ipynb for examples. This notebook was built as a beginner's guide to using the library, so it has example code, as well as detailed instructions for use.

## Disclaimer

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tag = True
search = version="{current_version}"
replace = version="{new_version}"

[bumpversion:file:src/bcr/__init__.py]
[bumpversion:file:src/bcr_api/__init__.py]
search = __version__ = "{current_version}"
replace = __version__ = "{new_version}"

Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@


setup(
name="bcr",
name="bcr-api",
version="1.0.0",
description="A client library for the Brandwatch Consumer Research API",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/BrandwatchLtd/api_sdk",
url="https://github.com/BrandwatchLtd/bcr-api",
author="Paul Siegel, Matthew Franglen, Colin Sullivan, Hamish Morgan and Peter Fairfax",
author_email="[email protected], [email protected], [email protected], [email protected]",
license="License :: OSI Approved :: MIT License",
Expand All @@ -30,9 +30,9 @@
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
],
packages=find_packages(where="src", include=["bcr"]),
packages=find_packages(where="src", include=["bcr_api"]),
package_dir={"": "src"},
entry_points={"console_scripts": ["bcr-authenticate = bcr.authenticate:main"]},
entry_points={"console_scripts": ["bcr-authenticate = bcr_api.authenticate:main"]},
install_requires=requirements,
tests_require=test_requirements,
setup_requires=setup_requirements,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/test_bwproject.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
import tempfile

from bcr.bwproject import BWProject
from bcr_api.bwproject import BWProject


class TestBWProjectUsernameCaseSensitivity(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion test/test_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import unittest
from pathlib import Path

from bcr.credentials import CredentialsStore
from bcr_api.credentials import CredentialsStore

ACCESS_TOKEN = "00000000-0000-0000-0000-000000000000"

Expand Down
2 changes: 1 addition & 1 deletion test/test_id_name_map.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest

from bcr.bwresources import BWQueries
from bcr_api.bwresources import BWQueries

query_id = 1111111111

Expand Down

0 comments on commit 869cde1

Please sign in to comment.