Skip to content

Commit

Permalink
added config.json, renamed swagger_client -> giphy_client
Browse files Browse the repository at this point in the history
  • Loading branch information
af-inet committed May 11, 2017
1 parent 4810fff commit 59ccd6c
Show file tree
Hide file tree
Showing 103 changed files with 334 additions and 324 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# swagger_client
# giphy_client
Giphy's public api.

This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
Expand All @@ -23,7 +23,7 @@ pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

Then import the package:
```python
import swagger_client
import giphy_client
```

### Setuptools
Expand All @@ -37,7 +37,7 @@ python setup.py install --user

Then import the package:
```python
import swagger_client
import giphy_client
```

## Getting Started
Expand All @@ -47,11 +47,11 @@ Please follow the [installation procedure](#installation--usage) and then run th
```python
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
import giphy_client
from giphy_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.DefaultApi()
api_instance = giphy_client.DefaultApi()
api_key = 'dc6zaTOxFJmzC' # str | Giphy API Key.
category = 'category_example' # str | Filters results by category.
limit = 25 # int | The maximum number of records to return. (optional) (default to 25)
Expand Down
7 changes: 7 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"packageName": "giphy_client",
"packageVersion": "1.0.0",
"packageUrl": "https://github.com/Giphy/giphy-python-client",
"sortParamsByRequiredFlag": true,
"hideGenerationTimestamp": true
}
80 changes: 40 additions & 40 deletions docs/DefaultApi.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# swagger_client.DefaultApi
# giphy_client.DefaultApi

All URIs are relative to *http://api.giphy.com/v1*

Expand Down Expand Up @@ -30,12 +30,12 @@ Returns a list of tags for a given category. NOTE `limit` and `offset` must both
```python
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
import giphy_client
from giphy_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
api_instance = giphy_client.DefaultApi()
api_key = 'dc6zaTOxFJmzC' # str | Giphy API Key.
category = 'category_example' # str | Filters results by category.
limit = 25 # int | The maximum number of records to return. (optional) (default to 25)
Expand Down Expand Up @@ -84,12 +84,12 @@ Returns a list of gifs for a given tag (alias to `/gif/search`).
```python
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
import giphy_client
from giphy_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
api_instance = giphy_client.DefaultApi()
api_key = 'dc6zaTOxFJmzC' # str | Giphy API Key.
category = 'category_example' # str | Filters results by category.
tag = 'tag_example' # str | Filters results by tag.
Expand Down Expand Up @@ -140,12 +140,12 @@ Returns a list of categories.
```python
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
import giphy_client
from giphy_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
api_instance = giphy_client.DefaultApi()
api_key = 'dc6zaTOxFJmzC' # str | Giphy API Key.
limit = 25 # int | The maximum number of records to return. (optional) (default to 25)

Expand Down Expand Up @@ -190,12 +190,12 @@ A multiget version of the get GIF by ID endpoint.
```python
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
import giphy_client
from giphy_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
api_instance = giphy_client.DefaultApi()
api_key = 'dc6zaTOxFJmzC' # str | Giphy API Key.
ids = 'feqkVgjJpYtjy,7rzbxdu0ZEXLy' # str | Filters results by specified GIF IDs, separated by commas.

Expand Down Expand Up @@ -240,12 +240,12 @@ Returns a GIF given that GIF's unique ID
```python
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
import giphy_client
from giphy_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
api_instance = giphy_client.DefaultApi()
api_key = 'dc6zaTOxFJmzC' # str | Giphy API Key.
gif_id = 'gif_id_example' # str | Filters results by specified GIF ID.

Expand Down Expand Up @@ -290,12 +290,12 @@ Returns a random GIF, limited by tag. Excluding the tag parameter will return a
```python
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
import giphy_client
from giphy_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
api_instance = giphy_client.DefaultApi()
api_key = 'dc6zaTOxFJmzC' # str | Giphy API Key.
tag = 'burrito' # str | Filters results by specified tag. (optional)
rating = 'g' # str | Filters results by specified rating. (optional)
Expand Down Expand Up @@ -344,12 +344,12 @@ Search all Giphy GIFs for a word or phrase. Punctuation will be stripped and ign
```python
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
import giphy_client
from giphy_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
api_instance = giphy_client.DefaultApi()
api_key = 'dc6zaTOxFJmzC' # str | Giphy API Key.
q = 'cheeseburgers' # str | Search query term or prhase.
limit = 25 # int | The maximum number of records to return. (optional) (default to 25)
Expand Down Expand Up @@ -404,12 +404,12 @@ The translate API draws on search, but uses the Giphy `special sauce` to handle
```python
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
import giphy_client
from giphy_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
api_instance = giphy_client.DefaultApi()
api_key = 'dc6zaTOxFJmzC' # str | Giphy API Key.
s = 'ryan gosling' # str | Search term.

Expand Down Expand Up @@ -454,12 +454,12 @@ Fetch GIFs currently trending online. Hand curated by the GIPHY editorial team.
```python
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
import giphy_client
from giphy_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
api_instance = giphy_client.DefaultApi()
api_key = 'dc6zaTOxFJmzC' # str | Giphy API Key.
limit = 25 # int | The maximum number of records to return. (optional) (default to 25)
rating = 'g' # str | Filters results by specified rating. (optional)
Expand Down Expand Up @@ -508,12 +508,12 @@ Returns a random GIF, limited by tag. Excluding the tag parameter will return a
```python
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
import giphy_client
from giphy_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
api_instance = giphy_client.DefaultApi()
api_key = 'dc6zaTOxFJmzC' # str | Giphy API Key.
tag = 'burrito' # str | Filters results by specified tag. (optional)
rating = 'g' # str | Filters results by specified rating. (optional)
Expand Down Expand Up @@ -562,12 +562,12 @@ Replicates the functionality and requirements of the classic GIPHY search, but r
```python
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
import giphy_client
from giphy_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
api_instance = giphy_client.DefaultApi()
api_key = 'dc6zaTOxFJmzC' # str | Giphy API Key.
q = 'cheeseburgers' # str | Search query term or prhase.
limit = 25 # int | The maximum number of records to return. (optional) (default to 25)
Expand Down Expand Up @@ -622,12 +622,12 @@ The translate API draws on search, but uses the Giphy `special sauce` to handle
```python
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
import giphy_client
from giphy_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
api_instance = giphy_client.DefaultApi()
api_key = 'dc6zaTOxFJmzC' # str | Giphy API Key.
s = 'ryan gosling' # str | Search term.

Expand Down Expand Up @@ -672,12 +672,12 @@ Fetch GIFs currently trending online. Hand curated by the GIPHY editorial team.
```python
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
import giphy_client
from giphy_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
api_instance = giphy_client.DefaultApi()
api_key = 'dc6zaTOxFJmzC' # str | Giphy API Key.
limit = 25 # int | The maximum number of records to return. (optional) (default to 25)
rating = 'g' # str | Filters results by specified rating. (optional)
Expand Down
5 changes: 4 additions & 1 deletion generate.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/bin/bash

LANG=python
CONFIG=config.json
SRC=public.yaml

swagger-codegen generate \
-i public.yaml \
-i $SRC \
-l $LANG \
-c $CONFIG \
-o "."

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __init__(self):

# Logging Settings
self.logger = {}
self.logger["package_logger"] = logging.getLogger("swagger_client")
self.logger["package_logger"] = logging.getLogger("giphy_client")
self.logger["urllib3_logger"] = logging.getLogger("urllib3")
# Log format
self.logger_format = '%(asctime)s %(levelname)s %(message)s'
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.
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.
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.
File renamed without changes.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import sys
from setuptools import setup, find_packages

NAME = "swagger_client"
NAME = "giphy_client"
VERSION = "1.0.0"
# To install the library, run the following
#
Expand All @@ -30,7 +30,7 @@
version=VERSION,
description="giphy-api",
author_email="",
url="",
url="https://github.com/Giphy/giphy-python-client",
keywords=["Swagger", "giphy-api"],
install_requires=REQUIRES,
packages=find_packages(),
Expand Down
12 changes: 6 additions & 6 deletions test/test_base_channel_model.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# coding: utf-8

"""
GIPHY Public API
giphy-api
A test of what Giphy API docs would look like in Gelato
Giphy's public api.
OpenAPI spec version: 0.9.3
Expand All @@ -17,9 +17,9 @@
import sys
import unittest

import swagger_client
from swagger_client.rest import ApiException
from swagger_client.models.base_channel_model import BaseChannelModel
import giphy_client
from giphy_client.rest import ApiException
from giphy_client.models.base_channel_model import BaseChannelModel


class TestBaseChannelModel(unittest.TestCase):
Expand All @@ -35,7 +35,7 @@ def testBaseChannelModel(self):
"""
Test BaseChannelModel
"""
model = swagger_client.models.base_channel_model.BaseChannelModel()
model = giphy_client.models.base_channel_model.BaseChannelModel()


if __name__ == '__main__':
Expand Down
12 changes: 6 additions & 6 deletions test/test_base_channel_model_gifs.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# coding: utf-8

"""
GIPHY Public API
giphy-api
A test of what Giphy API docs would look like in Gelato
Giphy's public api.
OpenAPI spec version: 0.9.3
Expand All @@ -17,9 +17,9 @@
import sys
import unittest

import swagger_client
from swagger_client.rest import ApiException
from swagger_client.models.base_channel_model_gifs import BaseChannelModelGifs
import giphy_client
from giphy_client.rest import ApiException
from giphy_client.models.base_channel_model_gifs import BaseChannelModelGifs


class TestBaseChannelModelGifs(unittest.TestCase):
Expand All @@ -35,7 +35,7 @@ def testBaseChannelModelGifs(self):
"""
Test BaseChannelModelGifs
"""
model = swagger_client.models.base_channel_model_gifs.BaseChannelModelGifs()
model = giphy_client.models.base_channel_model_gifs.BaseChannelModelGifs()


if __name__ == '__main__':
Expand Down
Loading

0 comments on commit 59ccd6c

Please sign in to comment.