challonge_user_rails 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/challonge_user_rails/client.rb +6 -6
- data/lib/challonge_user_rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25a757e90585b4f83972e91eb65b2979514b7ae1b586824b6aa66e8cf51ca901
|
4
|
+
data.tar.gz: 2fd3d0e0c33779f8f9d3f2855e7f932ec7b84e7bcfcab36d80a888d04ae3a41c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab0a97882457c9fa400b29889b058b4059c233d2d3da424e9716b0598c3d6dfd63a2a7613768189e338fb399b700dfdb8e846329aed9404fb0f805ff815459a0
|
7
|
+
data.tar.gz: b736c2ccc8b5ea6a63772796fc56f1e5f69084a235798d7dd3d1f4091e1174be2ee8119b1213ba3e21f5c15f606c37dce4b577e6fdcac36f6ef28ff59fc7e929
|
data/Gemfile.lock
CHANGED
@@ -31,7 +31,7 @@ module ChallongeUserRails
|
|
31
31
|
#get all tournaments from user account
|
32
32
|
def tournaments
|
33
33
|
response = connection.get("tournaments.json")
|
34
|
-
{ code: response.status, status: '
|
34
|
+
{ code: response.status, status: 'success', data: response.body }
|
35
35
|
rescue Faraday::ClientError => err
|
36
36
|
{ code: err.response[:status], status: err.response[:headers][:status], data: JSON.parse(err.response[:body])["errors"]["detail"] }
|
37
37
|
end
|
@@ -39,7 +39,7 @@ module ChallongeUserRails
|
|
39
39
|
#get specific tournament via slug/url
|
40
40
|
def tournament(slug)
|
41
41
|
response = connection.get("tournaments/#{slug}.json")
|
42
|
-
{ code: response.status, status: '
|
42
|
+
{ code: response.status, status: 'success', data: response.body }
|
43
43
|
rescue Faraday::ClientError => err
|
44
44
|
{ code: err.response[:status], status: err.response[:headers][:status], data: JSON.parse(err.response[:body])["errors"]["detail"] }
|
45
45
|
end
|
@@ -47,7 +47,7 @@ module ChallongeUserRails
|
|
47
47
|
#get all matches of specific tournament
|
48
48
|
def matches(slug)
|
49
49
|
response = connection.get("tournaments/#{slug}/matches.json")
|
50
|
-
{ code: response.status, status: '
|
50
|
+
{ code: response.status, status: 'success', data: response.body }
|
51
51
|
rescue Faraday::ClientError => err
|
52
52
|
{ code: err.response[:status], status: err.response[:headers][:status], data: JSON.parse(err.response[:body])["errors"]["detail"] }
|
53
53
|
end
|
@@ -55,7 +55,7 @@ module ChallongeUserRails
|
|
55
55
|
#get specific match
|
56
56
|
def match(slug, id)
|
57
57
|
response = connection.get("tournaments/#{slug}/matches/#{id}.json")
|
58
|
-
{ code: response.status, status: '
|
58
|
+
{ code: response.status, status: 'success', data: response.body }
|
59
59
|
rescue Faraday::ClientError => err
|
60
60
|
{ code: err.response[:status], status: err.response[:headers][:status], data: JSON.parse(err.response[:body])["errors"]["detail"] }
|
61
61
|
end
|
@@ -63,7 +63,7 @@ module ChallongeUserRails
|
|
63
63
|
#create tournament
|
64
64
|
def create_tournament(data)
|
65
65
|
response = connection.post("tournaments.json", data)
|
66
|
-
{ code: response.status, status: '
|
66
|
+
{ code: response.status, status: 'success', data: response.body }
|
67
67
|
rescue Faraday::ClientError => err
|
68
68
|
{ code: err.response[:status], status: err.response[:headers][:status], data: JSON.parse(err.response[:body])["errors"]["detail"] }
|
69
69
|
end
|
@@ -71,7 +71,7 @@ module ChallongeUserRails
|
|
71
71
|
#delete tournament
|
72
72
|
def delete_tournament(slug)
|
73
73
|
response = connection.delete("tournaments/#{slug}.json")
|
74
|
-
{ code: response.status, status: '
|
74
|
+
{ code: response.status, status: 'success', data: response.body }
|
75
75
|
rescue Faraday::ClientError => err
|
76
76
|
{ code: err.response[:status], status: err.response[:headers][:status], data: JSON.parse(err.response[:body])["errors"]["detail"] }
|
77
77
|
end
|