This repository has been archived by the owner on Dec 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef7a3ef
commit ef6c6fc
Showing
16 changed files
with
50 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
*.pyc | ||
*.egg-info | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,5 @@ | |
install_requires=[], | ||
tests_require=[], | ||
include_package_data=True, | ||
test_suite="tests", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +0,0 @@ | ||
|
||
from config import Config | ||
from client import Client | ||
from errors import SklikApiError | ||
from methods.methods import Missing | ||
from methods.admethods import Ad, AdStat | ||
from methods.campaignmethods import Campaign, CampaignRegionPolygonVertex, \ | ||
CampaignRegion, CampaignStat | ||
from methods.conversionmethods import Conversion, ConversionType | ||
from methods.groupmethods import Group, GroupStat | ||
from methods.keywordmethods import Keyword, KeywordStat | ||
from methods.miscmethods import SearchService | ||
|
||
__all__ = [ | ||
"Config", "Client", "SklikApiError", "Missing", | ||
"Ad", "AdStat", | ||
"Campaign", "CampaignRegionPolygonVertex", "CampaignRegion", "CampaignStat", | ||
"Conversion", "ConversionType", | ||
"Group", "GroupStat", | ||
"Keyword", "KeywordStat", | ||
"SearchService", | ||
] | ||
|
||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
from config import Config | ||
from client import Client | ||
from errors import SklikApiError | ||
from methods.methods import Missing | ||
from methods.admethods import Ad, AdStat | ||
from methods.campaignmethods import Campaign, CampaignRegionPolygonVertex, \ | ||
CampaignRegion, CampaignStat | ||
from methods.conversionmethods import Conversion, ConversionType | ||
from methods.groupmethods import Group, GroupStat | ||
from methods.keywordmethods import Keyword, KeywordStat | ||
from methods.miscmethods import SearchService | ||
|
||
__all__ = [ | ||
"Config", "Client", "SklikApiError", "Missing", | ||
"Ad", "AdStat", | ||
"Campaign", "CampaignRegionPolygonVertex", "CampaignRegion", "CampaignStat", | ||
"Conversion", "ConversionType", | ||
"Group", "GroupStat", | ||
"Keyword", "KeywordStat", | ||
"SearchService", | ||
] | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,72 @@ | ||
|
||
class SklikApiError(Exception): | ||
"""Base Sklik API error exception class | ||
""" | ||
|
||
"""Base Sklik API error exception""" | ||
pass | ||
#endclass | ||
|
||
|
||
class SklikApiWarning(Warning): | ||
"""Base Sklik API warning exception class | ||
""" | ||
"""Base Sklik API warning exception""" | ||
pass | ||
|
||
|
||
class IncompatibleApiVersionError(SklikApiError): | ||
"""Sklik API has incompatible version error exception""" | ||
pass | ||
#endclass | ||
|
||
class NotFoundError(SklikApiError): | ||
"""Sklik API not found error exception | ||
""" | ||
|
||
class NotFoundError(SklikApiError): | ||
"""Sklik API not found error exception""" | ||
pass | ||
#endclass | ||
|
||
|
||
class ArgumentError(SklikApiError): | ||
"""Sklik API argument error exception | ||
""" | ||
"""Sklik API argument error exception""" | ||
|
||
__slots__ = ["__errors"] | ||
|
||
def __init__(self, message, errors): | ||
SklikApiError.__init__(self, message) | ||
self.__errors = errors | ||
#enddef | ||
|
||
def errors(self): | ||
return self.__errors | ||
#enddef | ||
|
||
def __str__(self): | ||
s = super(ArgumentError, self).__str__() | ||
return '; '.join([s] + self.__errors) | ||
#enddef | ||
|
||
#endclass | ||
|
||
class InvalidDataError(SklikApiError): | ||
"""Sklik API invalid data error exception | ||
""" | ||
"""Sklik API invalid data error exception""" | ||
|
||
__slots__ = ["__errors"] | ||
|
||
def __init__(self, message, errors): | ||
SklikApiError.__init__(self, message) | ||
self.__errors = errors | ||
#enddef | ||
|
||
def errors(self): | ||
return self.__errors | ||
#enddef | ||
|
||
def __str__(self): | ||
s = super(InvalidDataError, self).__str__() | ||
return '; '.join([s] + [e['id'] for e in self.__errors]) | ||
#enddef | ||
#endclass | ||
|
||
class AuthenticationError(SklikApiError): | ||
"""Sklik API authentication error exception | ||
""" | ||
|
||
class AuthenticationError(SklikApiError): | ||
"""Sklik API authentication error exception""" | ||
pass | ||
#endclass | ||
|
||
class SessionError(SklikApiError): | ||
"""Sklik API session error exception | ||
""" | ||
|
||
class SessionError(SklikApiError): | ||
"""Sklik API session error exception""" | ||
pass | ||
#endclass | ||
|
||
class AccessError(SklikApiError): | ||
"""Skik API access error exception | ||
""" | ||
|
||
class AccessError(SklikApiError): | ||
"""Skik API access error exception""" | ||
pass | ||
#endclass | ||
|
||
class NoActionWarning(SklikApiWarning): | ||
"""Sklik API no action error exception | ||
""" | ||
|
||
class NoActionWarning(SklikApiWarning): | ||
"""Sklik API no action error exception""" | ||
pass | ||
#endclass |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.