Commit Graph

149 Commits

Author SHA1 Message Date
67bf7e0df5 Ensure projection of node permissions 2016-07-13 16:51:13 +02:00
50cefd49d4 Using HTTP OPTIONS call for Project.node_type_has_method() 2016-07-13 16:02:55 +02:00
1bcbd866ce PEP8 formatting 2016-07-13 15:10:22 +02:00
283cd23bc1 Bumped version to 1.4.0 version-1.4.0 2016-07-13 11:05:08 +02:00
d33dbf9883 Added exception for 413 Request Entity Too Large 2016-07-08 12:31:40 +02:00
8565bf37b2 Use dict for HTTP status code → exception mapping. 2016-07-08 12:31:21 +02:00
d76fcfdeba Node: removed 'theatre_link' 2016-07-07 16:59:23 +02:00
bd99972246 Put a dummy NodeType back (FOR NOW!) 2016-07-07 15:39:58 +02:00
b34d56d44e Added Node.share() and Node.get_share_links() methods. 2016-07-07 15:18:26 +02:00
96ece1540d Removed the obsolete NodeType class. 2016-07-07 15:04:46 +02:00
2e4c5b2663 Split Node.create_asset_from_file and added direct uploading from file obj
Node.create_asset_from_file() is split such that the actual file upload is
handled by File.upload_to_project(). This now also supports directly
uploading from a file object, which could be an io.BytesIO() object to
upload from RAM.
2016-07-07 11:08:30 +02:00
2989449b25 Actually use the 'extra_where' option. 2016-07-06 16:18:34 +02:00
d03cf7f73f create_asset_from_file: added extra_where param to limit updatable nodes. 2016-07-05 17:28:19 +02:00
86b7358717 create_asset_from_file: allow parent_node_id=None
Also added more documentation.
2016-07-05 17:27:50 +02:00
8dfb0a193b Added Node.create_asset_from_file() utility function
This also adds some unittests using the Responses library.
2016-07-05 16:47:51 +02:00
6ad9b5f7bd Ported utils.remove_private_keys() from Pillar 2016-07-05 16:30:34 +02:00
2a86abe66e Datetimes are now returned as timezone-aware.
Timezone is hardcoded as UTC for now, as Pillar always returns UTC times.
2016-06-29 16:49:19 +02:00
a98986a261 Added pillarsdk.utils.is_valid_id(some_id) function.
This allows Pillar-Web to check for ID validity before sending IDs
from the URL to Pillar.
2016-06-29 13:05:04 +02:00
7b6a42f3e7 Bumped version to 1.3.0 version-1.3.0 2016-06-28 15:28:06 +02:00
f388410b45 Remove testing on Python 3.4, as Ubuntu's default 3.x is now 3.5. 2016-06-28 15:24:05 +02:00
cdb68fbcf7 Ensure Resource.find_first returns an object of the correct type. 2016-06-17 14:29:16 +02:00
9a256bf07d Also expose ForbiddenAccess exception 2016-06-17 14:29:03 +02:00
b8048925a1 Force projection of Project.category and Project.user.
This is required for finding the home project.
2016-06-15 15:12:11 +02:00
7b96aa656b Separated api.get() from utils.convert_datetime() call.
Both are equally likely to fail, so now we can see which from the stack
trace and the line number.
2016-05-31 17:58:13 +02:00
72499b6fbb Added Resource.new(dict_or_resource) class method.
This allows one to up-cast a Resource to a File, Project, Node, etc.
2016-05-31 17:57:40 +02:00
03fab52da2 Prevent KeyError when thumbnail has no link.
This can happen when the link isn't refreshing properly. It's better to
show an empty thumbnail than a 500 Internal Server Error.
2016-05-31 17:57:08 +02:00
4b028d85c9 Added exception for HTTP 412/Precondition Failed 2016-05-30 14:54:27 +02:00
b1c2b105af Expose Resource class at top module level 2016-05-23 18:12:22 +02:00
2d195c7cd3 Added User.me() and Find.find_from_endpoint() class methods. 2016-05-23 14:19:14 +02:00
75d71b824f Bumped version to 1.2.0 version-1.2.0 2016-05-18 15:26:17 +02:00
3e223bcc9f Added List.all_from_endpoint(url) function.
This is useful when resources should be loaded from a custom Pillar
endpoint.
2016-05-18 13:02:26 +02:00
cfa8840c64 Add URL in error messages. 2016-05-18 13:02:02 +02:00
8312388641 Removed File.thumbnail_file in favour of File.thumbnail 2016-05-13 10:51:26 +02:00
bea3385866 Bumped version to 1.1.2 version-1.1.2 2016-05-10 15:03:28 +02:00
d7370eee33 Updated changelog 2016-05-10 15:03:09 +02:00
99d46593bf made "'field' in resource" work 2016-05-10 15:02:27 +02:00
a9920fa76a Files: Get thumbnails from variations, rather than from 'link' property
The 'link' property might not exist, for example when a user is not a
Cloud subscriber.
2016-05-10 12:45:27 +02:00
1e44703147 Don't include *.md files in wheel.
Those are installed in /usr/lib/pillarsdk or /path/to/venv/lib/pillarsdk,
which is too far away from the Python package itself.
2016-05-09 15:03:14 +02:00
56da7923d7 Bumped version to 1.1.1 version-1.1.1 2016-05-09 14:36:25 +02:00
a229251f62 Gracefully handle missing 'allowed_methods' 2016-05-09 14:34:25 +02:00
a6364f338e Bumped version to 1.1.0 version-1.1.0 2016-05-09 12:19:58 +02:00
6f251feab8 Updated changelog 2016-05-09 12:16:20 +02:00
2664c7bf8b Use new /p/create entry point for project creation
Instead of POSTing to /projects, we now use /p/create to create a new
project.
2016-05-09 11:17:46 +02:00
e9289e05f3 Updated changelog 2016-05-06 10:50:14 +02:00
ef6ea3a927 Little tweak. 2016-05-06 10:49:35 +02:00
eb5ad24a32 User management functions for projects 2016-05-06 10:43:24 +02:00
348e9d6c19 Include README.md, LICENSE.md and CHANGELOG.md in wheel. version-1.0.1 2016-05-06 10:30:52 +02:00
611910372e Added changelog 2016-05-06 10:28:39 +02:00
ecbaf5ab97 Added script to update version numbers in all relevant places. 2016-05-06 10:26:51 +02:00
3cad957a4d Bumped version to 1.0.1 2016-05-06 10:26:41 +02:00