ice_and_fire_api 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,145 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.anapioficeandfire.com/api/characters?gender=Female&isAlive=false
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.10.0
12
+ response:
13
+ status:
14
+ code: 200
15
+ message:
16
+ headers:
17
+ date:
18
+ - Thu, 29 Dec 2016 17:42:18 GMT
19
+ content-type:
20
+ - application/json; charset=utf-8
21
+ content-length:
22
+ - '1030'
23
+ connection:
24
+ - close
25
+ set-cookie:
26
+ - __cfduid=d32f67267fe7c6ce307651bbcd78e9c481483033335; expires=Fri, 29-Dec-17
27
+ 17:42:15 GMT; path=/; domain=.anapioficeandfire.com; HttpOnly, ARRAffinity=bb02697a828a67d629cd8387c3e7fa89b5a5514b4c02be02a81f93ed19b16cab;Path=/;Domain=www.anapioficeandfire.com
28
+ cache-control:
29
+ - no-transform, must-revalidate, max-age=0, private
30
+ last-modified:
31
+ - Thu, 29 Dec 2016 17:42:18 GMT
32
+ etag:
33
+ - '"85b3ce8f67314deca9b1b8883a009c3e"'
34
+ vary:
35
+ - Accept-Encoding
36
+ link:
37
+ - <http://www.anapioficeandfire.com/api/characters?isAlive=False&gender=Female&page=2&pageSize=10>;
38
+ rel="next", <http://www.anapioficeandfire.com/api/characters?isAlive=False&gender=Female&page=1&pageSize=10>;
39
+ rel="first", <http://www.anapioficeandfire.com/api/characters?isAlive=False&gender=Female&page=38&pageSize=10>;
40
+ rel="last"
41
+ x-aspnet-version:
42
+ - 4.0.30319
43
+ x-powered-by:
44
+ - ASP.NET
45
+ server:
46
+ - cloudflare-nginx
47
+ cf-ray:
48
+ - 318f0c2da6a95516-ORD
49
+ body:
50
+ encoding: ASCII-8BIT
51
+ string: "[\r\n {\r\n \"url\": \"http://www.anapioficeandfire.com/api/characters/16\",\r\n
52
+ \ \"name\": \"Margaery Tyrell\",\r\n \"gender\": \"Female\",\r\n \"culture\":
53
+ \"Westeros\",\r\n \"born\": \"In 283 AC, at Highgarden\",\r\n \"died\":
54
+ \"\",\r\n \"titles\": [\r\n \"Queen of the Seven Kingdoms\"\r\n ],\r\n
55
+ \ \"aliases\": [\r\n \"The Little Queen\",\r\n \"The Little Rose\",\r\n
56
+ \ \"Maid Margaery\"\r\n ],\r\n \"father\": \"\",\r\n \"mother\":
57
+ \"\",\r\n \"spouse\": \"http://www.anapioficeandfire.com/api/characters/862\",\r\n
58
+ \ \"allegiances\": [\r\n \"http://www.anapioficeandfire.com/api/houses/398\"\r\n
59
+ \ ],\r\n \"books\": [\r\n \"http://www.anapioficeandfire.com/api/books/1\",\r\n
60
+ \ \"http://www.anapioficeandfire.com/api/books/2\",\r\n \"http://www.anapioficeandfire.com/api/books/3\",\r\n
61
+ \ \"http://www.anapioficeandfire.com/api/books/5\",\r\n \"http://www.anapioficeandfire.com/api/books/8\"\r\n
62
+ \ ],\r\n \"povBooks\": [],\r\n \"tvSeries\": [\r\n \"Season 2\",\r\n
63
+ \ \"Season 3\",\r\n \"Season 4\",\r\n \"Season 5\",\r\n \"Season
64
+ 6\"\r\n ],\r\n \"playedBy\": [\r\n \"Natalie Dormer\"\r\n ]\r\n
65
+ \ },\r\n {\r\n \"url\": \"http://www.anapioficeandfire.com/api/characters/17\",\r\n
66
+ \ \"name\": \"Melicent\",\r\n \"gender\": \"Female\",\r\n \"culture\":
67
+ \"\",\r\n \"born\": \"\",\r\n \"died\": \"\",\r\n \"titles\": [\r\n
68
+ \ \"Septa\"\r\n ],\r\n \"aliases\": [],\r\n \"father\": \"\",\r\n
69
+ \ \"mother\": \"\",\r\n \"spouse\": \"\",\r\n \"allegiances\": [],\r\n
70
+ \ \"books\": [\r\n \"http://www.anapioficeandfire.com/api/books/5\"\r\n
71
+ \ ],\r\n \"povBooks\": [],\r\n \"tvSeries\": [],\r\n \"playedBy\":
72
+ []\r\n },\r\n {\r\n \"url\": \"http://www.anapioficeandfire.com/api/characters/19\",\r\n
73
+ \ \"name\": \"Moelle\",\r\n \"gender\": \"Female\",\r\n \"culture\":
74
+ \"\",\r\n \"born\": \"\",\r\n \"died\": \"\",\r\n \"titles\": [\r\n
75
+ \ \"Septa\"\r\n ],\r\n \"aliases\": [],\r\n \"father\": \"\",\r\n
76
+ \ \"mother\": \"\",\r\n \"spouse\": \"\",\r\n \"allegiances\": [],\r\n
77
+ \ \"books\": [\r\n \"http://www.anapioficeandfire.com/api/books/5\",\r\n
78
+ \ \"http://www.anapioficeandfire.com/api/books/8\"\r\n ],\r\n \"povBooks\":
79
+ [],\r\n \"tvSeries\": [],\r\n \"playedBy\": []\r\n },\r\n {\r\n \"url\":
80
+ \"http://www.anapioficeandfire.com/api/characters/21\",\r\n \"name\": \"Nysterica\",\r\n
81
+ \ \"gender\": \"Female\",\r\n \"culture\": \"\",\r\n \"born\": \"\",\r\n
82
+ \ \"died\": \"\",\r\n \"titles\": [\r\n \"Septa\"\r\n ],\r\n
83
+ \ \"aliases\": [],\r\n \"father\": \"\",\r\n \"mother\": \"\",\r\n
84
+ \ \"spouse\": \"\",\r\n \"allegiances\": [],\r\n \"books\": [\r\n
85
+ \ \"http://www.anapioficeandfire.com/api/books/3\",\r\n \"http://www.anapioficeandfire.com/api/books/5\",\r\n
86
+ \ \"http://www.anapioficeandfire.com/api/books/8\"\r\n ],\r\n \"povBooks\":
87
+ [],\r\n \"tvSeries\": [],\r\n \"playedBy\": []\r\n },\r\n {\r\n \"url\":
88
+ \"http://www.anapioficeandfire.com/api/characters/25\",\r\n \"name\": \"Scolera\",\r\n
89
+ \ \"gender\": \"Female\",\r\n \"culture\": \"\",\r\n \"born\": \"\",\r\n
90
+ \ \"died\": \"\",\r\n \"titles\": [\r\n \"Septa\"\r\n ],\r\n
91
+ \ \"aliases\": [],\r\n \"father\": \"\",\r\n \"mother\": \"\",\r\n
92
+ \ \"spouse\": \"\",\r\n \"allegiances\": [],\r\n \"books\": [\r\n
93
+ \ \"http://www.anapioficeandfire.com/api/books/5\",\r\n \"http://www.anapioficeandfire.com/api/books/8\"\r\n
94
+ \ ],\r\n \"povBooks\": [],\r\n \"tvSeries\": [],\r\n \"playedBy\":
95
+ []\r\n },\r\n {\r\n \"url\": \"http://www.anapioficeandfire.com/api/characters/28\",\r\n
96
+ \ \"name\": \"Unella\",\r\n \"gender\": \"Female\",\r\n \"culture\":
97
+ \"\",\r\n \"born\": \"\",\r\n \"died\": \"\",\r\n \"titles\": [\r\n
98
+ \ \"Septa\"\r\n ],\r\n \"aliases\": [],\r\n \"father\": \"\",\r\n
99
+ \ \"mother\": \"\",\r\n \"spouse\": \"\",\r\n \"allegiances\": [],\r\n
100
+ \ \"books\": [\r\n \"http://www.anapioficeandfire.com/api/books/5\",\r\n
101
+ \ \"http://www.anapioficeandfire.com/api/books/8\"\r\n ],\r\n \"povBooks\":
102
+ [],\r\n \"tvSeries\": [\r\n \"Season 5\",\r\n \"Season 6\"\r\n
103
+ \ ],\r\n \"playedBy\": [\r\n \"Hannah Waddingham\"\r\n ]\r\n
104
+ \ },\r\n {\r\n \"url\": \"http://www.anapioficeandfire.com/api/characters/48\",\r\n
105
+ \ \"name\": \"Aelinor Penrose\",\r\n \"gender\": \"Female\",\r\n \"culture\":
106
+ \"Valyrian\",\r\n \"born\": \"\",\r\n \"died\": \"\",\r\n \"titles\":
107
+ [\r\n \"Queen\"\r\n ],\r\n \"aliases\": [],\r\n \"father\":
108
+ \"\",\r\n \"mother\": \"\",\r\n \"spouse\": \"http://www.anapioficeandfire.com/api/characters/61\",\r\n
109
+ \ \"allegiances\": [\r\n \"http://www.anapioficeandfire.com/api/houses/300\",\r\n
110
+ \ \"http://www.anapioficeandfire.com/api/houses/378\"\r\n ],\r\n \"books\":
111
+ [\r\n \"http://www.anapioficeandfire.com/api/books/6\",\r\n \"http://www.anapioficeandfire.com/api/books/11\"\r\n
112
+ \ ],\r\n \"povBooks\": [],\r\n \"tvSeries\": [],\r\n \"playedBy\":
113
+ []\r\n },\r\n {\r\n \"url\": \"http://www.anapioficeandfire.com/api/characters/63\",\r\n
114
+ \ \"name\": \"Aglantine\",\r\n \"gender\": \"Female\",\r\n \"culture\":
115
+ \"\",\r\n \"born\": \"\",\r\n \"died\": \"\",\r\n \"titles\": [\r\n
116
+ \ \"Septa\"\r\n ],\r\n \"aliases\": [],\r\n \"father\": \"\",\r\n
117
+ \ \"mother\": \"\",\r\n \"spouse\": \"\",\r\n \"allegiances\": [],\r\n
118
+ \ \"books\": [\r\n \"http://www.anapioficeandfire.com/api/books/5\",\r\n
119
+ \ \"http://www.anapioficeandfire.com/api/books/8\"\r\n ],\r\n \"povBooks\":
120
+ [],\r\n \"tvSeries\": [],\r\n \"playedBy\": []\r\n },\r\n {\r\n \"url\":
121
+ \"http://www.anapioficeandfire.com/api/characters/66\",\r\n \"name\": \"Alannys
122
+ Harlaw\",\r\n \"gender\": \"Female\",\r\n \"culture\": \"Ironborn\",\r\n
123
+ \ \"born\": \"\",\r\n \"died\": \"\",\r\n \"titles\": [\r\n \"Queen
124
+ of the Iron Islands\"\r\n ],\r\n \"aliases\": [\r\n \"Lanny\"\r\n
125
+ \ ],\r\n \"father\": \"\",\r\n \"mother\": \"\",\r\n \"spouse\":
126
+ \"http://www.anapioficeandfire.com/api/characters/12\",\r\n \"allegiances\":
127
+ [\r\n \"http://www.anapioficeandfire.com/api/houses/169\",\r\n \"http://www.anapioficeandfire.com/api/houses/178\"\r\n
128
+ \ ],\r\n \"books\": [\r\n \"http://www.anapioficeandfire.com/api/books/1\",\r\n
129
+ \ \"http://www.anapioficeandfire.com/api/books/2\",\r\n \"http://www.anapioficeandfire.com/api/books/5\",\r\n
130
+ \ \"http://www.anapioficeandfire.com/api/books/8\"\r\n ],\r\n \"povBooks\":
131
+ [],\r\n \"tvSeries\": [],\r\n \"playedBy\": []\r\n },\r\n {\r\n \"url\":
132
+ \"http://www.anapioficeandfire.com/api/characters/69\",\r\n \"name\": \"Alerie
133
+ Hightower\",\r\n \"gender\": \"Female\",\r\n \"culture\": \"\",\r\n
134
+ \ \"born\": \"In or between 257 AC and 263 AC, at Oldtown\",\r\n \"died\":
135
+ \"\",\r\n \"titles\": [\r\n \"Lady of Highgarden\"\r\n ],\r\n \"aliases\":
136
+ [],\r\n \"father\": \"\",\r\n \"mother\": \"\",\r\n \"spouse\": \"http://www.anapioficeandfire.com/api/characters/691\",\r\n
137
+ \ \"allegiances\": [\r\n \"http://www.anapioficeandfire.com/api/houses/195\",\r\n
138
+ \ \"http://www.anapioficeandfire.com/api/houses/398\"\r\n ],\r\n \"books\":
139
+ [\r\n \"http://www.anapioficeandfire.com/api/books/1\",\r\n \"http://www.anapioficeandfire.com/api/books/2\",\r\n
140
+ \ \"http://www.anapioficeandfire.com/api/books/3\",\r\n \"http://www.anapioficeandfire.com/api/books/5\",\r\n
141
+ \ \"http://www.anapioficeandfire.com/api/books/8\"\r\n ],\r\n \"povBooks\":
142
+ [],\r\n \"tvSeries\": [],\r\n \"playedBy\": []\r\n }\r\n]"
143
+ http_version:
144
+ recorded_at: Thu, 29 Dec 2016 17:42:18 GMT
145
+ recorded_with: VCR 3.0.3
@@ -15,7 +15,7 @@ http_interactions:
15
15
  message:
16
16
  headers:
17
17
  date:
18
- - Mon, 26 Dec 2016 15:23:37 GMT
18
+ - Thu, 29 Dec 2016 17:31:40 GMT
19
19
  content-type:
20
20
  - application/json; charset=utf-8
21
21
  content-length:
@@ -23,8 +23,8 @@ http_interactions:
23
23
  connection:
24
24
  - close
25
25
  set-cookie:
26
- - __cfduid=d66be78c070509ed9bab58484e0c17f341482765817; expires=Tue, 26-Dec-17
27
- 15:23:37 GMT; path=/; domain=.anapioficeandfire.com; HttpOnly, ARRAffinity=bb02697a828a67d629cd8387c3e7fa89b5a5514b4c02be02a81f93ed19b16cab;Path=/;Domain=www.anapioficeandfire.com
26
+ - __cfduid=d13c259b6710e3197c5f85f8b22ab64f71483032699; expires=Fri, 29-Dec-17
27
+ 17:31:39 GMT; path=/; domain=.anapioficeandfire.com; HttpOnly, ARRAffinity=bb02697a828a67d629cd8387c3e7fa89b5a5514b4c02be02a81f93ed19b16cab;Path=/;Domain=www.anapioficeandfire.com
28
28
  cache-control:
29
29
  - no-transform, must-revalidate, max-age=0, private
30
30
  last-modified:
@@ -44,7 +44,7 @@ http_interactions:
44
44
  server:
45
45
  - cloudflare-nginx
46
46
  cf-ray:
47
- - 317588f6603b5625-ORD
47
+ - 318efca6c11a561f-ORD
48
48
  body:
49
49
  encoding: ASCII-8BIT
50
50
  string: "[\r\n {\r\n \"url\": \"http://www.anapioficeandfire.com/api/characters/583\",\r\n
@@ -65,5 +65,5 @@ http_interactions:
65
65
  \ \"Season 4\",\r\n \"Season 5\",\r\n \"Season 6\"\r\n ],\r\n
66
66
  \ \"playedBy\": [\r\n \"Kit Harington\"\r\n ]\r\n }\r\n]"
67
67
  http_version:
68
- recorded_at: Mon, 26 Dec 2016 15:23:37 GMT
68
+ recorded_at: Thu, 29 Dec 2016 17:31:40 GMT
69
69
  recorded_with: VCR 3.0.3
@@ -15,7 +15,7 @@ http_interactions:
15
15
  message:
16
16
  headers:
17
17
  date:
18
- - Mon, 26 Dec 2016 15:23:37 GMT
18
+ - Thu, 29 Dec 2016 17:31:40 GMT
19
19
  content-type:
20
20
  - application/json; charset=utf-8
21
21
  content-length:
@@ -23,8 +23,8 @@ http_interactions:
23
23
  connection:
24
24
  - close
25
25
  set-cookie:
26
- - __cfduid=dd6f58aacc7bdf69f64e8de989aad06211482765817; expires=Tue, 26-Dec-17
27
- 15:23:37 GMT; path=/; domain=.anapioficeandfire.com; HttpOnly, ARRAffinity=bb02697a828a67d629cd8387c3e7fa89b5a5514b4c02be02a81f93ed19b16cab;Path=/;Domain=www.anapioficeandfire.com
26
+ - __cfduid=d33fd6d06e3f1367db39fee016e550d841483032700; expires=Fri, 29-Dec-17
27
+ 17:31:40 GMT; path=/; domain=.anapioficeandfire.com; HttpOnly, ARRAffinity=bb02697a828a67d629cd8387c3e7fa89b5a5514b4c02be02a81f93ed19b16cab;Path=/;Domain=www.anapioficeandfire.com
28
28
  cache-control:
29
29
  - no-transform, must-revalidate, max-age=0, private
30
30
  last-modified:
@@ -44,7 +44,7 @@ http_interactions:
44
44
  server:
45
45
  - cloudflare-nginx
46
46
  cf-ray:
47
- - 317588f7e38709b2-ORD
47
+ - 318efca7f1f910f3-ORD
48
48
  body:
49
49
  encoding: ASCII-8BIT
50
50
  string: "[\r\n {\r\n \"url\": \"http://www.anapioficeandfire.com/api/houses/188\",\r\n
@@ -58,5 +58,5 @@ http_interactions:
58
58
  \ \"ancestralWeapons\": [],\r\n \"cadetBranches\": [],\r\n \"swornMembers\":
59
59
  []\r\n }\r\n]"
60
60
  http_version:
61
- recorded_at: Mon, 26 Dec 2016 15:23:37 GMT
61
+ recorded_at: Thu, 29 Dec 2016 17:31:40 GMT
62
62
  recorded_with: VCR 3.0.3
@@ -0,0 +1,97 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.anapioficeandfire.com/api/houses?pageSize=5&region=The+North
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.10.0
12
+ response:
13
+ status:
14
+ code: 200
15
+ message:
16
+ headers:
17
+ date:
18
+ - Thu, 29 Dec 2016 17:54:19 GMT
19
+ content-type:
20
+ - application/json; charset=utf-8
21
+ content-length:
22
+ - '706'
23
+ connection:
24
+ - close
25
+ set-cookie:
26
+ - __cfduid=df0325115306f4c5598d3a7918ce427d41483034059; expires=Fri, 29-Dec-17
27
+ 17:54:19 GMT; path=/; domain=.anapioficeandfire.com; HttpOnly, ARRAffinity=bb02697a828a67d629cd8387c3e7fa89b5a5514b4c02be02a81f93ed19b16cab;Path=/;Domain=www.anapioficeandfire.com
28
+ cache-control:
29
+ - no-transform, must-revalidate, max-age=0, private
30
+ last-modified:
31
+ - Thu, 29 Dec 2016 17:54:19 GMT
32
+ etag:
33
+ - '"71b7880ba24a4a10a9f064bc3ad95726"'
34
+ vary:
35
+ - Accept-Encoding
36
+ link:
37
+ - <http://www.anapioficeandfire.com/api/houses?region=The%20North&page=2&pageSize=5>;
38
+ rel="next", <http://www.anapioficeandfire.com/api/houses?region=The%20North&page=1&pageSize=5>;
39
+ rel="first", <http://www.anapioficeandfire.com/api/houses?region=The%20North&page=13&pageSize=5>;
40
+ rel="last"
41
+ x-aspnet-version:
42
+ - 4.0.30319
43
+ x-powered-by:
44
+ - ASP.NET
45
+ server:
46
+ - cloudflare-nginx
47
+ cf-ray:
48
+ - 318f1dd6310c24fb-ORD
49
+ body:
50
+ encoding: ASCII-8BIT
51
+ string: "[\r\n {\r\n \"url\": \"http://www.anapioficeandfire.com/api/houses/3\",\r\n
52
+ \ \"name\": \"House Amber\",\r\n \"region\": \"The North\",\r\n \"coatOfArms\":
53
+ \"\",\r\n \"words\": \"\",\r\n \"titles\": [],\r\n \"seats\": [],\r\n
54
+ \ \"currentLord\": \"\",\r\n \"heir\": \"\",\r\n \"overlord\": \"\",\r\n
55
+ \ \"founded\": \"\",\r\n \"founder\": \"\",\r\n \"diedOut\": \"\",\r\n
56
+ \ \"ancestralWeapons\": [],\r\n \"cadetBranches\": [],\r\n \"swornMembers\":
57
+ []\r\n },\r\n {\r\n \"url\": \"http://www.anapioficeandfire.com/api/houses/9\",\r\n
58
+ \ \"name\": \"House Ashwood\",\r\n \"region\": \"The North\",\r\n \"coatOfArms\":
59
+ \"\",\r\n \"words\": \"\",\r\n \"titles\": [],\r\n \"seats\": [],\r\n
60
+ \ \"currentLord\": \"\",\r\n \"heir\": \"\",\r\n \"overlord\": \"http://www.anapioficeandfire.com/api/houses/34\",\r\n
61
+ \ \"founded\": \"\",\r\n \"founder\": \"\",\r\n \"diedOut\": \"\",\r\n
62
+ \ \"ancestralWeapons\": [],\r\n \"cadetBranches\": [],\r\n \"swornMembers\":
63
+ []\r\n },\r\n {\r\n \"url\": \"http://www.anapioficeandfire.com/api/houses/30\",\r\n
64
+ \ \"name\": \"House Boggs\",\r\n \"region\": \"The North\",\r\n \"coatOfArms\":
65
+ \"\",\r\n \"words\": \"\",\r\n \"titles\": [],\r\n \"seats\": [],\r\n
66
+ \ \"currentLord\": \"\",\r\n \"heir\": \"\",\r\n \"overlord\": \"http://www.anapioficeandfire.com/api/houses/318\",\r\n
67
+ \ \"founded\": \"\",\r\n \"founder\": \"\",\r\n \"diedOut\": \"\",\r\n
68
+ \ \"ancestralWeapons\": [],\r\n \"cadetBranches\": [],\r\n \"swornMembers\":
69
+ []\r\n },\r\n {\r\n \"url\": \"http://www.anapioficeandfire.com/api/houses/32\",\r\n
70
+ \ \"name\": \"House Bole\",\r\n \"region\": \"The North\",\r\n \"coatOfArms\":
71
+ \"\",\r\n \"words\": \"\",\r\n \"titles\": [],\r\n \"seats\": [],\r\n
72
+ \ \"currentLord\": \"\",\r\n \"heir\": \"\",\r\n \"overlord\": \"http://www.anapioficeandfire.com/api/houses/150\",\r\n
73
+ \ \"founded\": \"\",\r\n \"founder\": \"\",\r\n \"diedOut\": \"\",\r\n
74
+ \ \"ancestralWeapons\": [],\r\n \"cadetBranches\": [],\r\n \"swornMembers\":
75
+ []\r\n },\r\n {\r\n \"url\": \"http://www.anapioficeandfire.com/api/houses/34\",\r\n
76
+ \ \"name\": \"House Bolton of the Dreadfort\",\r\n \"region\": \"The
77
+ North\",\r\n \"coatOfArms\": \"A red flayed man on pink de sang\",\r\n
78
+ \ \"words\": \"Our Blades are Sharp\",\r\n \"titles\": [\r\n \"Red
79
+ King (Age of Heroes)\",\r\n \"Lord of the Dreadfort\",\r\n \"Warden
80
+ of the North\"\r\n ],\r\n \"seats\": [\r\n \"The Dreadfort\"\r\n
81
+ \ ],\r\n \"currentLord\": \"http://www.anapioficeandfire.com/api/characters/933\",\r\n
82
+ \ \"heir\": \"http://www.anapioficeandfire.com/api/characters/849\",\r\n
83
+ \ \"overlord\": \"http://www.anapioficeandfire.com/api/houses/16\",\r\n
84
+ \ \"founded\": \"Age of Heroes\",\r\n \"founder\": \"\",\r\n \"diedOut\":
85
+ \"\",\r\n \"ancestralWeapons\": [],\r\n \"cadetBranches\": [],\r\n \"swornMembers\":
86
+ [\r\n \"http://www.anapioficeandfire.com/api/characters/196\",\r\n \"http://www.anapioficeandfire.com/api/characters/314\",\r\n
87
+ \ \"http://www.anapioficeandfire.com/api/characters/849\",\r\n \"http://www.anapioficeandfire.com/api/characters/933\",\r\n
88
+ \ \"http://www.anapioficeandfire.com/api/characters/1084\",\r\n \"http://www.anapioficeandfire.com/api/characters/1159\",\r\n
89
+ \ \"http://www.anapioficeandfire.com/api/characters/1208\",\r\n \"http://www.anapioficeandfire.com/api/characters/1313\",\r\n
90
+ \ \"http://www.anapioficeandfire.com/api/characters/1329\",\r\n \"http://www.anapioficeandfire.com/api/characters/1452\",\r\n
91
+ \ \"http://www.anapioficeandfire.com/api/characters/1492\",\r\n \"http://www.anapioficeandfire.com/api/characters/1648\",\r\n
92
+ \ \"http://www.anapioficeandfire.com/api/characters/1747\",\r\n \"http://www.anapioficeandfire.com/api/characters/1949\",\r\n
93
+ \ \"http://www.anapioficeandfire.com/api/characters/2077\"\r\n ]\r\n
94
+ \ }\r\n]"
95
+ http_version:
96
+ recorded_at: Thu, 29 Dec 2016 17:54:19 GMT
97
+ recorded_with: VCR 3.0.3
@@ -12,13 +12,26 @@ describe IceAndFireApi::Book do
12
12
  end
13
13
  end
14
14
 
15
- describe 'find_by_name' do
16
- it 'pulls information on a storm of swords' do
17
- VCR.use_cassette('book_find_by_name') do
18
- book = IceAndFireApi::Book.find_by_name('A Storm Of Swords')
19
- expect(book.first).to be_instance_of IceAndFireApi::Book
20
- expect(book.first.name).to eq('A Storm of Swords')
21
- expect(book.first.authors).to include('George R. R. Martin')
15
+ describe 'find_by' do
16
+ context 'name' do
17
+ it 'pulls information on a storm of swords' do
18
+ VCR.use_cassette('book_find_by_name') do
19
+ book = IceAndFireApi::Book.find_by(name: 'A Storm Of Swords')
20
+ expect(book.first).to be_instance_of IceAndFireApi::Book
21
+ expect(book.first.name).to eq('A Storm of Swords')
22
+ expect(book.first.authors).to include('George R. R. Martin')
23
+ end
24
+ end
25
+ end
26
+
27
+ context 'latest releases' do
28
+ it 'filters books only released after 2010' do
29
+ VCR.use_cassette('book_find_by_release_date') do
30
+ book = IceAndFireApi::Book.find_by(fromReleaseDate: '2010-09-22T00:00:00')
31
+ expect(book[1]).to be_instance_of IceAndFireApi::Book
32
+ expect(book[1].name).to eq('A Dance with Dragons')
33
+ expect(book[1].released).to eq('2011-07-12T00:00:00')
34
+ end
22
35
  end
23
36
  end
24
37
  end
@@ -13,14 +13,27 @@ describe IceAndFireApi::Character do
13
13
  end
14
14
  end
15
15
 
16
- describe 'find_by_name' do
17
- it 'pulls information on jon snow' do
18
- VCR.use_cassette('character_find_by_name') do
19
- character = IceAndFireApi::Character.find_by_name('Jon Snow')
20
- expect(character.first).to be_instance_of IceAndFireApi::Character
21
- expect(character.first.name).to eq('Jon Snow')
22
- expect(character.first.gender).to eq('Male')
23
- expect(character.first.died).to eq('')
16
+ describe 'find_by' do
17
+ context 'name' do
18
+ it 'pulls information on jon snow' do
19
+ VCR.use_cassette('character_find_by_name') do
20
+ character = IceAndFireApi::Character.find_by(name: 'Jon Snow')
21
+ expect(character.first).to be_instance_of IceAndFireApi::Character
22
+ expect(character.first.name).to eq('Jon Snow')
23
+ expect(character.first.gender).to eq('Male')
24
+ expect(character.first.died).to eq('')
25
+ end
26
+ end
27
+ end
28
+
29
+ context 'dead women' do
30
+ it 'filters female characters who are deceased' do
31
+ VCR.use_cassette('character_find_by_gender') do
32
+ character = IceAndFireApi::Character.find_by(gender: 'Female', isAlive: false)
33
+ expect(character.first).to be_instance_of IceAndFireApi::Character
34
+ expect(character.first.name).to eq('Margaery Tyrell')
35
+ expect(character.first.gender).to eq('Female')
36
+ end
24
37
  end
25
38
  end
26
39
  end
@@ -12,13 +12,25 @@ describe IceAndFireApi::House do
12
12
  end
13
13
  end
14
14
 
15
- describe 'find_by_name' do
16
- it 'pulls information on house hawthorne' do
17
- VCR.use_cassette('house_find_by_name') do
18
- house = IceAndFireApi::House.find_by_name('House Hawthorne')
19
- expect(house.first).to be_instance_of IceAndFireApi::House
20
- expect(house.first.name).to eq('House Hawthorne')
21
- expect(house.first.region).to eq('The Westerlands')
15
+ describe 'find_by' do
16
+ context 'name' do
17
+ it 'pulls information on house hawthorne' do
18
+ VCR.use_cassette('house_find_by_name') do
19
+ house = IceAndFireApi::House.find_by(name: 'House Hawthorne')
20
+ expect(house.first).to be_instance_of IceAndFireApi::House
21
+ expect(house.first.name).to eq('House Hawthorne')
22
+ expect(house.first.region).to eq('The Westerlands')
23
+ end
24
+ end
25
+ end
26
+
27
+ context 'region with page size' do
28
+ it 'filters houses in a given region with a page size' do
29
+ VCR.use_cassette('house_find_by_region') do
30
+ house = IceAndFireApi::House.find_by(region: 'The North', pageSize: 5)
31
+ expect(house.first).to be_instance_of IceAndFireApi::House
32
+ expect(house.first.name).to eq('House Amber')
33
+ end
22
34
  end
23
35
  end
24
36
  end
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  describe IceAndFireApi do
4
4
  it 'has a version number' do
5
- expect(IceAndFireApi::VERSION).to eq('1.0.0')
5
+ expect(IceAndFireApi::VERSION).to eq('1.1.0')
6
6
  end
7
7
 
8
8
  it 'contains an api url' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ice_and_fire_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Belling
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-26 00:00:00.000000000 Z
11
+ date: 2016-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -140,10 +140,13 @@ files:
140
140
  - lib/ice_and_fire_api/version.rb
141
141
  - spec/fixtures/book_find.yml
142
142
  - spec/fixtures/book_find_by_name.yml
143
+ - spec/fixtures/book_find_by_release_date.yml
143
144
  - spec/fixtures/character_find.yml
145
+ - spec/fixtures/character_find_by_gender.yml
144
146
  - spec/fixtures/character_find_by_name.yml
145
147
  - spec/fixtures/house_find.yml
146
148
  - spec/fixtures/house_find_by_name.yml
149
+ - spec/fixtures/house_find_by_region.yml
147
150
  - spec/fixtures/root_find.yml
148
151
  - spec/ice_and_fire_api/book_spec.rb
149
152
  - spec/ice_and_fire_api/character_spec.rb