dropbox_api 0.1.5 β 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +4 -3
- data/Gemfile +4 -0
- data/README.md +20 -19
- data/Rakefile +1 -0
- data/TODO.md +9 -2
- data/api_coverage.md +1 -1
- data/lib/dropbox_api.rb +2 -0
- data/lib/dropbox_api/endpoints/files/upload_session_start.rb +1 -1
- data/lib/dropbox_api/endpoints/sharing/unshare_file.rb +19 -0
- data/lib/dropbox_api/errors/unshare_file_error.rb +8 -0
- data/lib/dropbox_api/metadata/file.rb +1 -0
- data/lib/dropbox_api/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b389b70a2387d0fdb49c3fdb6f2eee7f668c8a6
|
4
|
+
data.tar.gz: d3e52de1f131820d0bef5ceef1317d3e27f87bf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a6069d423d4a9166875aaaa13d7a10147eddc28035eaa46e330bf63e05ed9c88d3397ca42085a1135aaccf12f7059cb3f8b27ae5fa8af000c3e0085e3e2873f
|
7
|
+
data.tar.gz: 5a589ff7f10403e2dca274742b2e22f27f1ab370094f47168f6f16b543b569d92b0dd8da40e45cb33043b74a6319a4caa1eabbba098a190ce0047372ad25b59b
|
data/.yardopts
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
--load yardoc/endpoint_handler.rb
|
2
|
-
--
|
3
|
-
--load yardoc/helpers/html_helper.rb
|
1
|
+
--load ./yardoc/endpoint_handler.rb
|
2
|
+
--plugin rspec
|
4
3
|
lib/**/*.rb
|
5
4
|
spec/endpoints/**/*_spec.rb
|
5
|
+
--markup=markdown
|
6
|
+
--markup-provider=redcarpet
|
6
7
|
-
|
7
8
|
api_coverage.md
|
8
9
|
rails_setup.md
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -18,7 +18,23 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
$ gem install dropbox_api
|
20
20
|
|
21
|
-
##
|
21
|
+
## Documentation
|
22
|
+
|
23
|
+
Please, refer to this gem's custom [Dropbox API
|
24
|
+
documentation](http://jesus.github.io/dropbox_api).
|
25
|
+
Most of the time you'll be checking the [available
|
26
|
+
endpoints](http://jesus.github.io/dropbox_api/DropboxApi/Client.html).
|
27
|
+
|
28
|
+
Unfortunately, the documentation at [RubyDoc.info](http://www.rubydoc.info) is
|
29
|
+
disrecommended because it lacks some nice features that have been added with
|
30
|
+
YARD plugins:
|
31
|
+
|
32
|
+
- Each endpoint includes its tests right below the description, this works as
|
33
|
+
an example of its usage.
|
34
|
+
- All endpoints are shown as methods of the `Client` class, just as you will
|
35
|
+
use them.
|
36
|
+
|
37
|
+
## Basic set up
|
22
38
|
|
23
39
|
### Authorize your application
|
24
40
|
|
@@ -76,7 +92,7 @@ Dropbox's [OAuth guide]
|
|
76
92
|
(https://www.dropbox.com/developers/reference/oauth-guide#oauth-2-on-the-web).
|
77
93
|
|
78
94
|
If you have a Rails application, you might be interested in this [setup
|
79
|
-
guide](http://
|
95
|
+
guide](http://jesus.github.io/dropbox_api/file.rails_setup.html).
|
80
96
|
|
81
97
|
### Performing API calls
|
82
98
|
|
@@ -100,32 +116,17 @@ result.has_more?
|
|
100
116
|
|
101
117
|
The instance of `Client` we've initialized is the one you'll be using to
|
102
118
|
perform API calls. You can check the class' documentation to find
|
103
|
-
[all available endpoints]
|
104
|
-
(http://www.rubydoc.info/gems/dropbox_api/DropboxApi/Client)
|
105
|
-
|
106
|
-
## Dependencies
|
107
|
-
|
108
|
-
### Network adapter
|
109
|
-
|
110
|
-
This gem uses [faraday](https://github.com/lostisland/faraday#faraday).
|
111
|
-
So it should work on any network library.
|
119
|
+
[all available endpoints](http://jesus.github.io/dropbox_api/DropboxApi/Client.html)
|
112
120
|
|
113
121
|
## Development
|
114
122
|
|
115
123
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
116
124
|
`bin/console` for an interactive prompt that will allow you to experiment.
|
117
125
|
|
118
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To
|
119
|
-
release a new version, update the version number in `version.rb`, and then run
|
120
|
-
`bundle exec rake release` to create a git tag for the version, push git
|
121
|
-
commits and tags, and push the `.gem` file to
|
122
|
-
[rubygems.org](https://rubygems.org).
|
123
|
-
|
124
126
|
## Contributing
|
125
127
|
|
126
128
|
Any help will be much appreciated. The easiest way to help is to implement one
|
127
|
-
or more of the [endpoints that are still pending]
|
128
|
-
(http://www.rubydoc.info/gems/dropbox_api/file/api_coverage.md). To see how the
|
129
|
+
or more of the [endpoints that are still pending](http://jesus.github.io/dropbox_api/file.api_coverage.html). To see how the
|
129
130
|
endpoints are implemented, check out the `lib/dropbox_api/endpoints` folder.
|
130
131
|
|
131
132
|
If you want to help but you're unsure how to get started, please get in touch
|
data/Rakefile
CHANGED
data/TODO.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
# TODO now!
|
2
|
+
|
3
|
+
- Rebuild spec fixtures for `list_folder`.
|
4
|
+
- Add documentation on how to rebuild spec fixtures.
|
5
|
+
|
1
6
|
# Upcoming
|
2
7
|
|
3
8
|
TOKEN: VofXAX8DO1sAAAAAAAAEEyqrmzbYmFVaDQKj48yVUfhyhfOomXiG8emqP1xQGRnJ
|
@@ -24,8 +29,6 @@ TOKEN: VofXAX8DO1sAAAAAAAAEEyqrmzbYmFVaDQKj48yVUfhyhfOomXiG8emqP1xQGRnJ
|
|
24
29
|
|
25
30
|
# Further on
|
26
31
|
|
27
|
-
- Improve the API reference page, help here:
|
28
|
-
http://gnuu.org/2009/11/18/customizing-yard-templates/
|
29
32
|
- Supporting streams would be great.
|
30
33
|
- Add a layer to handle pagination, use `Enumerable`.
|
31
34
|
|
@@ -40,3 +43,7 @@ Release process:
|
|
40
43
|
3. `git fetch`
|
41
44
|
4. `gem build dropbox_api.gemspec`
|
42
45
|
5. `gem push dropbox_api-version.gem`
|
46
|
+
|
47
|
+
## Publish doc
|
48
|
+
|
49
|
+
1.
|
data/api_coverage.md
CHANGED
data/lib/dropbox_api.rb
CHANGED
@@ -78,6 +78,7 @@ require 'dropbox_api/errors/upload_session_lookup_error'
|
|
78
78
|
require 'dropbox_api/errors/upload_session_finish_error'
|
79
79
|
require 'dropbox_api/errors/upload_write_failed_error'
|
80
80
|
require 'dropbox_api/errors/upload_error'
|
81
|
+
require 'dropbox_api/errors/unshare_file_error'
|
81
82
|
require 'dropbox_api/errors/poll_error'
|
82
83
|
require 'dropbox_api/errors/add_file_member_error'
|
83
84
|
require 'dropbox_api/errors/add_folder_member_error'
|
@@ -140,6 +141,7 @@ require 'dropbox_api/endpoints/sharing/list_folder_members'
|
|
140
141
|
require 'dropbox_api/endpoints/sharing/share_folder'
|
141
142
|
require 'dropbox_api/endpoints/sharing/list_shared_links'
|
142
143
|
require 'dropbox_api/endpoints/sharing/create_shared_link_with_settings'
|
144
|
+
require 'dropbox_api/endpoints/sharing/unshare_file'
|
143
145
|
require 'dropbox_api/endpoints/users/get_account'
|
144
146
|
require 'dropbox_api/endpoints/users/get_account_batch'
|
145
147
|
require 'dropbox_api/endpoints/users/get_current_account'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module DropboxApi::Endpoints::Sharing
|
2
|
+
class UnshareFile < DropboxApi::Endpoints::Rpc
|
3
|
+
Method = :post
|
4
|
+
Path = "/2/sharing/unshare_file".freeze
|
5
|
+
ResultType = DropboxApi::Results::VoidResult
|
6
|
+
ErrorType = DropboxApi::Errors::UnshareFileError
|
7
|
+
|
8
|
+
# Remove all members from this file. Does not remove inherited members.
|
9
|
+
#
|
10
|
+
# A successful response indicates that the file was unshared.
|
11
|
+
#
|
12
|
+
# @param file [String] Path or ID of the file in the user's Dropbox to unshare.
|
13
|
+
add_endpoint :unshare_file do |file|
|
14
|
+
perform_request({
|
15
|
+
:file => file
|
16
|
+
})
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/dropbox_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dropbox_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JesΓΊs Burgos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -173,6 +173,7 @@ files:
|
|
173
173
|
- lib/dropbox_api/endpoints/sharing/list_folder_members.rb
|
174
174
|
- lib/dropbox_api/endpoints/sharing/list_shared_links.rb
|
175
175
|
- lib/dropbox_api/endpoints/sharing/share_folder.rb
|
176
|
+
- lib/dropbox_api/endpoints/sharing/unshare_file.rb
|
176
177
|
- lib/dropbox_api/endpoints/users/get_account.rb
|
177
178
|
- lib/dropbox_api/endpoints/users/get_account_batch.rb
|
178
179
|
- lib/dropbox_api/endpoints/users/get_current_account.rb
|
@@ -209,6 +210,7 @@ files:
|
|
209
210
|
- lib/dropbox_api/errors/sharing_file_access_error.rb
|
210
211
|
- lib/dropbox_api/errors/sharing_user_error.rb
|
211
212
|
- lib/dropbox_api/errors/too_many_requests_error.rb
|
213
|
+
- lib/dropbox_api/errors/unshare_file_error.rb
|
212
214
|
- lib/dropbox_api/errors/upload_error.rb
|
213
215
|
- lib/dropbox_api/errors/upload_session_finish_error.rb
|
214
216
|
- lib/dropbox_api/errors/upload_session_lookup_error.rb
|