utorrent-webapi-ruby 0.0.1 → 0.0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -1
- data/lib/u_torrent/torrent.rb +3 -1
- data/lib/u_torrent/version.rb +1 -1
- data/utorrent-webapi-ruby.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00de944a6c2444043494de2a78c55a33bb0eb302
|
4
|
+
data.tar.gz: c61533c6524a044f02a4f7df686254b40488e63b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70d2e31e475112a6b18e64ff642048a28df821e274be00872649ccef24c9d207e2149d82d28c842df1c49aa4c9241af4a4e3d8237eafbadcaac6fe105b56a38f
|
7
|
+
data.tar.gz: e8b9f40417d9a7fb3806a125a7563ce55f7261cd35b93d778cc01c739784991f99ca4832f49b4d368abed9bba25220941025934b27327191adeda9fd47405a76
|
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
-
# utorrent-webapi-ruby
|
1
|
+
# utorrent-webapi-ruby (BETA)
|
2
2
|
|
3
|
+
This gem is used to utilise the µTorrent 2.0 (or above) webapi
|
4
|
+
|
5
|
+
It uses the new [authentication mechanism](https://forum.utorrent.com/topic/49550-attention-webui-developers-support-token-authentication/), also you can find the [api reference](http://help.utorrent.com/customer/portal/topics/664593/articles).
|
3
6
|
|
4
7
|
## Installation
|
5
8
|
|
@@ -28,6 +31,7 @@ The current version only support the following actions
|
|
28
31
|
* Querying files within a specific torrent [attributes](https://github.com/PeterWuMC/utorrent-webapi-ruby/blob/master/lib/u_torrent/file.rb#L10-L13)
|
29
32
|
* Add new torrent using with url
|
30
33
|
* Updating a file [priority](https://github.com/PeterWuMC/utorrent-webapi-ruby/blob/master/lib/u_torrent/file.rb#L3-L8)
|
34
|
+
* As of the current version, it does not have any error handling. Also the token is only valid for 30 minutes and it does not get automatically renewed.
|
31
35
|
|
32
36
|
## Usage
|
33
37
|
|
data/lib/u_torrent/torrent.rb
CHANGED
@@ -42,7 +42,9 @@ module UTorrent
|
|
42
42
|
action: 'add-url',
|
43
43
|
s: url
|
44
44
|
)
|
45
|
-
|
45
|
+
all_torrents = UTorrent::Torrent.all
|
46
|
+
max_queue_order = all_torrents.map(&:queue_order).max
|
47
|
+
all_torrents.detect { |torrent| torrent.queue_order == max_queue_order }
|
46
48
|
end
|
47
49
|
|
48
50
|
def statuses
|
data/lib/u_torrent/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utorrent-webapi-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1
|
4
|
+
version: 0.0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Wu
|
@@ -14,16 +14,16 @@ dependencies:
|
|
14
14
|
name: nokogiri
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.6.7.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.6.7.0
|
27
27
|
description: UTorrent webapi ruby library
|
28
28
|
email:
|
29
29
|
- petergenius@gmail.com
|