-
Notifications
You must be signed in to change notification settings - Fork 648
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Added ObjectStorySpec (and related Objects) to make it easier for developers to build specs for API without having to write out a giant JSON string. Test Plan: Update the config.json file Run tests python -m facebookads.test.unit python -m facebookads.test.integration <ACCESS_TOKEN>
- Loading branch information
Evan Chen
committed
Oct 23, 2014
1 parent
8c4455b
commit 9ee253e
Showing
16 changed files
with
382 additions
and
73 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,6 +1,16 @@ | ||
== 0.1.1 == | ||
0.2.0 | ||
- Added ObjectStorySpec and specs module | ||
- Moved integration tests to their own file | ||
- Added ValidatesFields mixin | ||
- Added bootstrap.auth() function to make using REPL easier | ||
- Deprecated remote_create_with_filename | ||
- Deprecated AbstractObject child method | ||
- Renamed _read_update() to _set_data() | ||
|
||
|
||
0.1.1 | ||
- Increase version requirement for required configparser package (Python 3 compatibility fix) | ||
- Misc issue fix requests | ||
|
||
== 0.1.0 == | ||
0.1.0 | ||
Initial release. |
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
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,4 +1,8 @@ | ||
{ | ||
"app_id": "<YOUR_APP_ID>", | ||
"app_secret": "<YOUR_APP_SECRET>" | ||
"app_secret": "<YOUR_APP_SECRET>", | ||
|
||
/* For running tests */ | ||
"act_id": "act_<YOUR_ACCOUNT_ID>", | ||
"page_id": "<YOUR_PAGE_ID>" | ||
} |
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
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
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
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
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
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,32 @@ | ||
# Copyright 2014 Facebook, Inc. | ||
|
||
# You are hereby granted a non-exclusive, worldwide, royalty-free license to | ||
# use, copy, modify, and distribute this software in source code or binary | ||
# form for use in connection with the web services and APIs provided by | ||
# Facebook. | ||
|
||
# As with any software that integrates with the Facebook platform, your use | ||
# of this software is subject to the Facebook Developer Principles and | ||
# Policies [http://developers.facebook.com/policy/]. This copyright notice | ||
# shall be included in all copies or substantial portions of the software. | ||
|
||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
# DEALINGS IN THE SOFTWARE. | ||
|
||
from facebookads.exceptions import FacebookBadObjectError | ||
|
||
|
||
class ValidatesFields(object): | ||
def __setitem__(self, key, value): | ||
if key not in self.Field.__dict__: | ||
raise FacebookBadObjectError( | ||
"\"%s\" is not a valid field of %s" | ||
% (key, self.__class__.__name__) | ||
) | ||
else: | ||
super(ValidatesFields, self).__setitem__(key, value) |
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
Oops, something went wrong.