Skip to content

Commit

Permalink
Merge f1fc4cb into f7b484c
Browse files Browse the repository at this point in the history
  • Loading branch information
Ana Margarida Silva committed May 19, 2021
2 parents f7b484c + f1fc4cb commit b2f0479
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/shopify/__init__.py
Expand Up @@ -38,12 +38,14 @@
from . import cart
from . import order
from . import product
from . import shop
from . import smart_collection
from . import webhook

from .base import API, OAuthAPI
from .cart import CartAPI
from .order import OrderAPI
from .product import ProductAPI
from .shop import ShopAPI
from .smart_collection import SmartCollectionAPI
from .webhook import WebhookAPI
2 changes: 2 additions & 0 deletions src/shopify/base.py
Expand Up @@ -45,6 +45,7 @@
from . import cart
from . import order
from . import product
from . import shop
from . import smart_collection
from . import webhook

Expand All @@ -70,6 +71,7 @@
class API(
appier.API,
cart.CartAPI,
shop.ShopAPI,
order.OrderAPI,
product.ProductAPI,
smart_collection.SmartCollectionAPI,
Expand Down
45 changes: 45 additions & 0 deletions src/shopify/shop.py
@@ -0,0 +1,45 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-

# Hive Shopify API
# Copyright (c) 2008-2020 Hive Solutions Lda.
#
# This file is part of Hive Shopify API.
#
# Hive Shopify API is free software: you can redistribute it and/or modify
# it under the terms of the Apache License as published by the Apache
# Foundation, either version 2.0 of the License, or (at your option) any
# later version.
#
# Hive Shopify API is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# Apache License for more details.
#
# You should have received a copy of the Apache License along with
# Hive Shopify API. If not, see <http://www.apache.org/licenses/>.

__author__ = "João Magalhães <joamag@hive.pt>"
""" The author(s) of the module """

__version__ = "1.0.0"
""" The version of the module """

__revision__ = "$LastChangedRevision$"
""" The revision number of the module """

__date__ = "$LastChangedDate$"
""" The last change date of the module """

__copyright__ = "Copyright (c) 2008-2020 Hive Solutions Lda."
""" The copyright for the module """

__license__ = "Apache License, Version 2.0"
""" The license for the module """

class ShopAPI(object):

def get_shop(self, *args, **kwargs):
url = self.base_url + "admin/shop.json"
contents = self.get(url, **kwargs)
return contents["shop"]

0 comments on commit b2f0479

Please sign in to comment.