rest_countries 1.0.0
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 +7 -0
- data/.rspec +3 -0
- data/.standard.yml +3 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/LICENSE.txt +21 -0
- data/README.md +91 -0
- data/Rakefile +10 -0
- data/lib/rest_countries/client.rb +109 -0
- data/lib/rest_countries/error.rb +3 -0
- data/lib/rest_countries/version.rb +5 -0
- data/lib/rest_countries.rb +8 -0
- data/sig/rest_countries.rbs +4 -0
- data/ting API Requests +145 -0
- metadata +75 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c859f16c16ef81060943f21b0d506cd239c1712c2a76420fa93f46ccef47f18d
|
4
|
+
data.tar.gz: 1f691366dfb05e221b1efa18702998536cb7cbd394efb0e48b422f4a7fce584d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d5b87300db3674a74e170fc6c4a1c71a5094065e4f3196aa614859e26663b60b3c5c3644d3ad022a61ad6b693d9d3185cb67889d2416f04ea6c62abde2c5b8aa
|
7
|
+
data.tar.gz: 4f82e38de329457884b8dab1c4baa73e3014dd791d231b6af27dc802878824686a92728391dc5de298cdcaacb965f61474901e577acb48a202c4e1590a5a924b
|
data/.rspec
ADDED
data/.standard.yml
ADDED
data/CHANGELOG.md
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
6
|
+
|
7
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
8
|
+
|
9
|
+
## Our Standards
|
10
|
+
|
11
|
+
Examples of behavior that contributes to a positive environment for our community include:
|
12
|
+
|
13
|
+
* Demonstrating empathy and kindness toward other people
|
14
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
15
|
+
* Giving and gracefully accepting constructive feedback
|
16
|
+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
17
|
+
* Focusing on what is best not just for us as individuals, but for the overall community
|
18
|
+
|
19
|
+
Examples of unacceptable behavior include:
|
20
|
+
|
21
|
+
* The use of sexualized language or imagery, and sexual attention or
|
22
|
+
advances of any kind
|
23
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
24
|
+
* Public or private harassment
|
25
|
+
* Publishing others' private information, such as a physical or email
|
26
|
+
address, without their explicit permission
|
27
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
28
|
+
professional setting
|
29
|
+
|
30
|
+
## Enforcement Responsibilities
|
31
|
+
|
32
|
+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
33
|
+
|
34
|
+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
35
|
+
|
36
|
+
## Scope
|
37
|
+
|
38
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
39
|
+
|
40
|
+
## Enforcement
|
41
|
+
|
42
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at cimafrancamae@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
|
43
|
+
|
44
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
45
|
+
|
46
|
+
## Enforcement Guidelines
|
47
|
+
|
48
|
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
49
|
+
|
50
|
+
### 1. Correction
|
51
|
+
|
52
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
53
|
+
|
54
|
+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
55
|
+
|
56
|
+
### 2. Warning
|
57
|
+
|
58
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
59
|
+
|
60
|
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
61
|
+
|
62
|
+
### 3. Temporary Ban
|
63
|
+
|
64
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
65
|
+
|
66
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
67
|
+
|
68
|
+
### 4. Permanent Ban
|
69
|
+
|
70
|
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
71
|
+
|
72
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
73
|
+
|
74
|
+
## Attribution
|
75
|
+
|
76
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
|
77
|
+
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
78
|
+
|
79
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
80
|
+
|
81
|
+
[homepage]: https://www.contributor-covenant.org
|
82
|
+
|
83
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
84
|
+
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2024 maeci
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
# RestCountries
|
2
|
+
|
3
|
+
A Ruby Client for [Rest Countries v.3.1](https://restcountries.com/)
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Install the gem and add to the application's Gemfile by executing:
|
8
|
+
|
9
|
+
$ bundle add rest_countries
|
10
|
+
|
11
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
12
|
+
|
13
|
+
$ gem install rest_countries
|
14
|
+
|
15
|
+
## Usage
|
16
|
+
|
17
|
+
To access the API, you'll need to create a RestCountries::Client.
|
18
|
+
|
19
|
+
$ client = RestCountries::Client.new
|
20
|
+
|
21
|
+
The client then gives you access to the endpoints
|
22
|
+
|
23
|
+
### All
|
24
|
+
|
25
|
+
$ client.all
|
26
|
+
|
27
|
+
### Name
|
28
|
+
|
29
|
+
$ client.name(country_name)
|
30
|
+
|
31
|
+
### Full Name
|
32
|
+
|
33
|
+
$ client.fullname(country_name)
|
34
|
+
|
35
|
+
### Code
|
36
|
+
|
37
|
+
$ client.code(code)
|
38
|
+
|
39
|
+
### List of Codes
|
40
|
+
|
41
|
+
$ client.codes(codes)
|
42
|
+
|
43
|
+
### Currency
|
44
|
+
|
45
|
+
$ client.currency(currency)
|
46
|
+
|
47
|
+
### Demonym
|
48
|
+
|
49
|
+
$ client.demonym(demonym)
|
50
|
+
|
51
|
+
### Language
|
52
|
+
|
53
|
+
$ client.language(language)
|
54
|
+
|
55
|
+
### Capital City
|
56
|
+
|
57
|
+
$ client.capital(capital)
|
58
|
+
|
59
|
+
### Region
|
60
|
+
|
61
|
+
$ client.region(region)
|
62
|
+
|
63
|
+
### Subregions
|
64
|
+
|
65
|
+
$ client.subregion(subregion)
|
66
|
+
|
67
|
+
### Translation
|
68
|
+
|
69
|
+
$ client.translation(translation)
|
70
|
+
|
71
|
+
### Filter Response
|
72
|
+
|
73
|
+
$ client.filter(service, fields)
|
74
|
+
|
75
|
+
## Development
|
76
|
+
|
77
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
78
|
+
|
79
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
80
|
+
|
81
|
+
## Contributing
|
82
|
+
|
83
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rest_countries. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/rest_countries/blob/master/CODE_OF_CONDUCT.md).
|
84
|
+
|
85
|
+
## License
|
86
|
+
|
87
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
88
|
+
|
89
|
+
## Code of Conduct
|
90
|
+
|
91
|
+
Everyone interacting in the RestCountries project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/rest_countries/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
@@ -0,0 +1,109 @@
|
|
1
|
+
require "faraday"
|
2
|
+
# require "faraday_middleware"
|
3
|
+
|
4
|
+
module RestCountries
|
5
|
+
class Client
|
6
|
+
BASE_URL = "https://restcountries.com/v3.1/"
|
7
|
+
|
8
|
+
attr_reader :adapter
|
9
|
+
|
10
|
+
def initialize(adapter: Faraday.default_adapter)
|
11
|
+
@adapter = adapter
|
12
|
+
end
|
13
|
+
|
14
|
+
def connection
|
15
|
+
@connection ||= Faraday.new(BASE_URL) do |conn|
|
16
|
+
conn.request :json
|
17
|
+
conn.response :json, content_type: "application/json"
|
18
|
+
conn.adapter adapter
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def all
|
23
|
+
response = connection.get("all")
|
24
|
+
handle_response(response)
|
25
|
+
end
|
26
|
+
|
27
|
+
# Search by country name. If you want to get an exact match, use the next endpoint. It can be the common or official value
|
28
|
+
def name(country_name)
|
29
|
+
response = connection.get("name/#{country_name}")
|
30
|
+
handle_response(response)
|
31
|
+
end
|
32
|
+
|
33
|
+
# Search by country’s full name. It can be the common or official value
|
34
|
+
def fullname(country_name)
|
35
|
+
response = connection.get("name/#{country_name}?fullText=true")
|
36
|
+
handle_response(response)
|
37
|
+
end
|
38
|
+
|
39
|
+
# Search by cca2, ccn3, cca3 or cioc country code
|
40
|
+
def code(code)
|
41
|
+
response = connection.get("alpha/#{code}")
|
42
|
+
handle_response(response)
|
43
|
+
end
|
44
|
+
|
45
|
+
# List of codes
|
46
|
+
def codes(codes)
|
47
|
+
response = connection.get("alpha?codes=#{codes.join(",")}")
|
48
|
+
handle_response(response)
|
49
|
+
end
|
50
|
+
|
51
|
+
# Search by currency code or name
|
52
|
+
def currency(currency)
|
53
|
+
response = connection.get("currency/#{currency}")
|
54
|
+
handle_response(response)
|
55
|
+
end
|
56
|
+
|
57
|
+
# Search by how a citizen is called
|
58
|
+
def demonym(demonym)
|
59
|
+
response = connection.get("demonym/#{demonym}")
|
60
|
+
handle_response(response)
|
61
|
+
end
|
62
|
+
|
63
|
+
# Search by language code or name
|
64
|
+
def language(language)
|
65
|
+
response = connection.get("lang/#{language}")
|
66
|
+
handle_response(response)
|
67
|
+
end
|
68
|
+
|
69
|
+
# Search by capital city
|
70
|
+
def capital(capital)
|
71
|
+
response = connection.get("capital/#{capital}")
|
72
|
+
handle_response(response)
|
73
|
+
end
|
74
|
+
|
75
|
+
# Search by region
|
76
|
+
def region(region)
|
77
|
+
response = connection.get("region/#{region}")
|
78
|
+
handle_response(response)
|
79
|
+
end
|
80
|
+
|
81
|
+
# Search by subregions
|
82
|
+
def subregion(subregion)
|
83
|
+
response = connection.get("subregion/#{subregion}")
|
84
|
+
handle_response(response)
|
85
|
+
end
|
86
|
+
|
87
|
+
# Search by any translation name
|
88
|
+
def translation(translation)
|
89
|
+
response = connection.get("translation/#{translation}")
|
90
|
+
handle_response(response)
|
91
|
+
end
|
92
|
+
|
93
|
+
# Filter the output of your request to include only the specified fields.
|
94
|
+
def filter(service, fields)
|
95
|
+
response = connection.get("#{service}?fields=#{fields.join(",")}")
|
96
|
+
handle_response(response)
|
97
|
+
end
|
98
|
+
|
99
|
+
private
|
100
|
+
|
101
|
+
def handle_response(response)
|
102
|
+
if response.success?
|
103
|
+
response.body
|
104
|
+
else
|
105
|
+
raise "Error fetching data: #{response.status}"
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
data/ting API Requests
ADDED
@@ -0,0 +1,145 @@
|
|
1
|
+
=>
|
2
|
+
[{[31m[1m"[0m[31mname[0m[31m[1m"[0m=>
|
3
|
+
{[31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldova[0m[31m[1m"[0m,
|
4
|
+
[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mRepublic of Moldova[0m[31m[1m"[0m,
|
5
|
+
[31m[1m"[0m[31mnativeName[0m[31m[1m"[0m=>{[31m[1m"[0m[31mron[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mRepublica Moldova[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldova[0m[31m[1m"[0m}}},
|
6
|
+
[31m[1m"[0m[31mtld[0m[31m[1m"[0m=>[[31m[1m"[0m[31m.md[0m[31m[1m"[0m],
|
7
|
+
[31m[1m"[0m[31mcca2[0m[31m[1m"[0m=>[31m[1m"[0m[31mMD[0m[31m[1m"[0m,
|
8
|
+
[31m[1m"[0m[31mccn3[0m[31m[1m"[0m=>[31m[1m"[0m[31m498[0m[31m[1m"[0m,
|
9
|
+
[31m[1m"[0m[31mcca3[0m[31m[1m"[0m=>[31m[1m"[0m[31mMDA[0m[31m[1m"[0m,
|
10
|
+
[31m[1m"[0m[31mcioc[0m[31m[1m"[0m=>[31m[1m"[0m[31mMDA[0m[31m[1m"[0m,
|
11
|
+
[31m[1m"[0m[31mindependent[0m[31m[1m"[0m=>[36m[1mtrue[0m,
|
12
|
+
[31m[1m"[0m[31mstatus[0m[31m[1m"[0m=>[31m[1m"[0m[31mofficially-assigned[0m[31m[1m"[0m,
|
13
|
+
[31m[1m"[0m[31munMember[0m[31m[1m"[0m=>[36m[1mtrue[0m,
|
14
|
+
[31m[1m"[0m[31mcurrencies[0m[31m[1m"[0m=>{[31m[1m"[0m[31mMDL[0m[31m[1m"[0m=>{[31m[1m"[0m[31mname[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldovan leu[0m[31m[1m"[0m, [31m[1m"[0m[31msymbol[0m[31m[1m"[0m=>[31m[1m"[0m[31mL[0m[31m[1m"[0m}},
|
15
|
+
[31m[1m"[0m[31midd[0m[31m[1m"[0m=>{[31m[1m"[0m[31mroot[0m[31m[1m"[0m=>[31m[1m"[0m[31m+3[0m[31m[1m"[0m, [31m[1m"[0m[31msuffixes[0m[31m[1m"[0m=>[[31m[1m"[0m[31m73[0m[31m[1m"[0m]},
|
16
|
+
[31m[1m"[0m[31mcapital[0m[31m[1m"[0m=>[[31m[1m"[0m[31mChișinău[0m[31m[1m"[0m],
|
17
|
+
[31m[1m"[0m[31maltSpellings[0m[31m[1m"[0m=>[[31m[1m"[0m[31mMD[0m[31m[1m"[0m, [31m[1m"[0m[31mMoldova, Republic of[0m[31m[1m"[0m, [31m[1m"[0m[31mRepublic of Moldova[0m[31m[1m"[0m, [31m[1m"[0m[31mRepublica Moldova[0m[31m[1m"[0m],
|
18
|
+
[31m[1m"[0m[31mregion[0m[31m[1m"[0m=>[31m[1m"[0m[31mEurope[0m[31m[1m"[0m,
|
19
|
+
[31m[1m"[0m[31msubregion[0m[31m[1m"[0m=>[31m[1m"[0m[31mEastern Europe[0m[31m[1m"[0m,
|
20
|
+
[31m[1m"[0m[31mlanguages[0m[31m[1m"[0m=>{[31m[1m"[0m[31mron[0m[31m[1m"[0m=>[31m[1m"[0m[31mRomanian[0m[31m[1m"[0m},
|
21
|
+
[31m[1m"[0m[31mtranslations[0m[31m[1m"[0m=>
|
22
|
+
{[31m[1m"[0m[31mara[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mجمهورية مولدوڤا[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mمولدوڤا[0m[31m[1m"[0m},
|
23
|
+
[31m[1m"[0m[31mbre[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mRepublik Moldova[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldova[0m[31m[1m"[0m},
|
24
|
+
[31m[1m"[0m[31mces[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldavská republika[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldavsko[0m[31m[1m"[0m},
|
25
|
+
[31m[1m"[0m[31mcym[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mRepublic of Moldova[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldova[0m[31m[1m"[0m},
|
26
|
+
[31m[1m"[0m[31mdeu[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mRepublik Moldau[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldawien[0m[31m[1m"[0m},
|
27
|
+
[31m[1m"[0m[31mest[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldova Vabariik[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldova[0m[31m[1m"[0m},
|
28
|
+
[31m[1m"[0m[31mfin[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldovan tasavalta[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldova[0m[31m[1m"[0m},
|
29
|
+
[31m[1m"[0m[31mfra[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mRépublique de Moldavie[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldavie[0m[31m[1m"[0m},
|
30
|
+
[31m[1m"[0m[31mhrv[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldavija[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldova[0m[31m[1m"[0m},
|
31
|
+
[31m[1m"[0m[31mhun[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldovai Köztársaság[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldova[0m[31m[1m"[0m},
|
32
|
+
[31m[1m"[0m[31mita[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mRepubblica di Moldova[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldavia[0m[31m[1m"[0m},
|
33
|
+
[31m[1m"[0m[31mjpn[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mモルドバ共和国[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mモルドバ共和国[0m[31m[1m"[0m},
|
34
|
+
[31m[1m"[0m[31mkor[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31m몰도바 공화국[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31m몰도바[0m[31m[1m"[0m},
|
35
|
+
[31m[1m"[0m[31mnld[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mRepubliek Moldavië[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldavië[0m[31m[1m"[0m},
|
36
|
+
[31m[1m"[0m[31mper[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mجمهوری مولداوی[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mمولداوی[0m[31m[1m"[0m},
|
37
|
+
[31m[1m"[0m[31mpol[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mRepublika Mołdawii[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mMołdawia[0m[31m[1m"[0m},
|
38
|
+
[31m[1m"[0m[31mpor[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mRepública da Moldávia[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldávia[0m[31m[1m"[0m},
|
39
|
+
[31m[1m"[0m[31mrus[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mМолдова[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mМолдавия[0m[31m[1m"[0m},
|
40
|
+
[31m[1m"[0m[31mslk[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldavská republika[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldavsko[0m[31m[1m"[0m},
|
41
|
+
[31m[1m"[0m[31mspa[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mRepública de Moldova[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldavia[0m[31m[1m"[0m},
|
42
|
+
[31m[1m"[0m[31msrp[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mРепублика Молдавија[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mМолдавија[0m[31m[1m"[0m},
|
43
|
+
[31m[1m"[0m[31mswe[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mRepubliken Moldavien[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldavien[0m[31m[1m"[0m},
|
44
|
+
[31m[1m"[0m[31mtur[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldova Cumhuriyeti[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldova[0m[31m[1m"[0m},
|
45
|
+
[31m[1m"[0m[31murd[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mجمہوریہ مالدووا[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mمالدووا[0m[31m[1m"[0m},
|
46
|
+
[31m[1m"[0m[31mzho[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31m摩尔多瓦共和国[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31m摩尔多瓦[0m[31m[1m"[0m}},
|
47
|
+
[31m[1m"[0m[31mlatlng[0m[31m[1m"[0m=>[[35m[1m47.0[0m, [35m[1m29.0[0m],
|
48
|
+
[31m[1m"[0m[31mlandlocked[0m[31m[1m"[0m=>[36m[1mtrue[0m,
|
49
|
+
[31m[1m"[0m[31mborders[0m[31m[1m"[0m=>[[31m[1m"[0m[31mROU[0m[31m[1m"[0m, [31m[1m"[0m[31mUKR[0m[31m[1m"[0m],
|
50
|
+
[31m[1m"[0m[31marea[0m[31m[1m"[0m=>[35m[1m33846.0[0m,
|
51
|
+
[31m[1m"[0m[31mdemonyms[0m[31m[1m"[0m=>{[31m[1m"[0m[31meng[0m[31m[1m"[0m=>{[31m[1m"[0m[31mf[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldovan[0m[31m[1m"[0m, [31m[1m"[0m[31mm[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldovan[0m[31m[1m"[0m}, [31m[1m"[0m[31mfra[0m[31m[1m"[0m=>{[31m[1m"[0m[31mf[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldave[0m[31m[1m"[0m, [31m[1m"[0m[31mm[0m[31m[1m"[0m=>[31m[1m"[0m[31mMoldave[0m[31m[1m"[0m}},
|
52
|
+
[31m[1m"[0m[31mflag[0m[31m[1m"[0m=>[31m[1m"[0m[31m🇲🇩[0m[31m[1m"[0m,
|
53
|
+
[31m[1m"[0m[31mmaps[0m[31m[1m"[0m=>
|
54
|
+
{[31m[1m"[0m[31mgoogleMaps[0m[31m[1m"[0m=>[31m[1m"[0m[31mhttps://goo.gl/maps/JjmyUuULujnDeFPf7[0m[31m[1m"[0m,
|
55
|
+
[31m[1m"[0m[31mopenStreetMaps[0m[31m[1m"[0m=>[31m[1m"[0m[31mhttps://www.openstreetmap.org/relation/58974[0m[31m[1m"[0m},
|
56
|
+
[31m[1m"[0m[31mpopulation[0m[31m[1m"[0m=>[34m[1m2617820[0m,
|
57
|
+
[31m[1m"[0m[31mgini[0m[31m[1m"[0m=>{[31m[1m"[0m[31m2018[0m[31m[1m"[0m=>[35m[1m25.7[0m},
|
58
|
+
[31m[1m"[0m[31mfifa[0m[31m[1m"[0m=>[31m[1m"[0m[31mMDA[0m[31m[1m"[0m,
|
59
|
+
[31m[1m"[0m[31mcar[0m[31m[1m"[0m=>{[31m[1m"[0m[31msigns[0m[31m[1m"[0m=>[[31m[1m"[0m[31mMD[0m[31m[1m"[0m], [31m[1m"[0m[31mside[0m[31m[1m"[0m=>[31m[1m"[0m[31mright[0m[31m[1m"[0m},
|
60
|
+
[31m[1m"[0m[31mtimezones[0m[31m[1m"[0m=>[[31m[1m"[0m[31mUTC+02:00[0m[31m[1m"[0m],
|
61
|
+
[31m[1m"[0m[31mcontinents[0m[31m[1m"[0m=>[[31m[1m"[0m[31mEurope[0m[31m[1m"[0m],
|
62
|
+
[31m[1m"[0m[31mflags[0m[31m[1m"[0m=>
|
63
|
+
{[31m[1m"[0m[31mpng[0m[31m[1m"[0m=>[31m[1m"[0m[31mhttps://flagcdn.com/w320/md.png[0m[31m[1m"[0m,
|
64
|
+
[31m[1m"[0m[31msvg[0m[31m[1m"[0m=>[31m[1m"[0m[31mhttps://flagcdn.com/md.svg[0m[31m[1m"[0m,
|
65
|
+
[31m[1m"[0m[31malt[0m[31m[1m"[0m=>
|
66
|
+
[31m[1m"[0m[31mThe flag of Moldova is composed of three equal vertical bands of blue, yellow and red, with the national coat of arms centered in the yellow band.[0m[31m[1m"[0m},
|
67
|
+
[31m[1m"[0m[31mcoatOfArms[0m[31m[1m"[0m=>
|
68
|
+
{[31m[1m"[0m[31mpng[0m[31m[1m"[0m=>[31m[1m"[0m[31mhttps://mainfacts.com/media/images/coats_of_arms/md.png[0m[31m[1m"[0m,
|
69
|
+
[31m[1m"[0m[31msvg[0m[31m[1m"[0m=>[31m[1m"[0m[31mhttps://mainfacts.com/media/images/coats_of_arms/md.svg[0m[31m[1m"[0m},
|
70
|
+
[31m[1m"[0m[31mstartOfWeek[0m[31m[1m"[0m=>[31m[1m"[0m[31mmonday[0m[31m[1m"[0m,
|
71
|
+
[31m[1m"[0m[31mcapitalInfo[0m[31m[1m"[0m=>{[31m[1m"[0m[31mlatlng[0m[31m[1m"[0m=>[[35m[1m47.01[0m, [35m[1m28.9[0m]},
|
72
|
+
[31m[1m"[0m[31mpostalCode[0m[31m[1m"[0m=>{[31m[1m"[0m[31mformat[0m[31m[1m"[0m=>[31m[1m"[0m[31mMD-####[0m[31m[1m"[0m, [31m[1m"[0m[31mregex[0m[31m[1m"[0m=>[31m[1m"[0m[31m^(?:MD)*(\\d{4})$[0m[31m[1m"[0m}},
|
73
|
+
{[31m[1m"[0m[31mname[0m[31m[1m"[0m=>
|
74
|
+
{[31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mUnited States[0m[31m[1m"[0m,
|
75
|
+
[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mUnited States of America[0m[31m[1m"[0m,
|
76
|
+
[31m[1m"[0m[31mnativeName[0m[31m[1m"[0m=>{[31m[1m"[0m[31meng[0m[31m[1m"[0m=>{[31m[1m"[0m[31mofficial[0m[31m[1m"[0m=>[31m[1m"[0m[31mUnited States of America[0m[31m[1m"[0m, [31m[1m"[0m[31mcommon[0m[31m[1m"[0m=>[31m[1m"[0m[31mUnited States[0m[31m[1m"[0m}}},
|
77
|
+
[31m[1m"[0m[31mtld[0m[31m[1m"[0m=>[[31m[1m"[0m[31m.us[0m[31m[1m"[0m],
|
78
|
+
[31m[1m"[0m[31mcca2[0m[31m[1m"[0m=>[31m[1m"[0m[31mUS[0m[31m[1m"[0m,
|
79
|
+
[31m[1m"[0m[31mccn3[0m[31m[1m"[0m=>[31m[1m"[0m[31m840[0m[31m[1m"[0m,
|
80
|
+
[31m[1m"[0m[31mcca3[0m[31m[1m"[0m=>[31m[1m"[0m[31mUSA[0m[31m[1m"[0m,
|
81
|
+
[31m[1m"[0m[31mcioc[0m[31m[1m"[0m=>[31m[1m"[0m[31mUSA[0m[31m[1m"[0m,
|
82
|
+
[31m[1m"[0m[31mindependent[0m[31m[1m"[0m=>[36m[1mtrue[0m,
|
83
|
+
[31m[1m"[0m[31mstatus[0m[31m[1m"[0m=>[31m[1m"[0m[31mofficially-assigned[0m[31m[1m"[0m,
|
84
|
+
[31m[1m"[0m[31munMember[0m[31m[1m"[0m=>[36m[1mtrue[0m,
|
85
|
+
[31m[1m"[0m[31mcurrencies[0m[31m[1m"[0m=>{[31m[1m"[0m[31mUSD[0m[31m[1m"[0m=>{[31m[1m"[0m[31mname[0m[31m[1m"[0m=>[31m[1m"[0m[31mUnited States dollar[0m[31m[1m"[0m, [31m[1m"[0m[31msymbol[0m[31m[1m"[0m=>[31m[1m"[0m[31m$[0m[31m[1m"[0m}},
|
86
|
+
[31m[1m"[0m[31midd[0m[31m[1m"[0m=>
|
87
|
+
{[31m[1m"[0m[31mroot[0m[31m[1m"[0m=>[31m[1m"[0m[31m+1[0m[31m[1m"[0m,
|
88
|
+
[31m[1m"[0m[31msuffixes[0m[31m[1m"[0m=>
|
89
|
+
[[31m[1m"[0m[31m201[0m[31m[1m"[0m,
|
90
|
+
[31m[1m"[0m[31m202[0m[31m[1m"[0m,
|
91
|
+
[31m[1m"[0m[31m203[0m[31m[1m"[0m,
|
92
|
+
[31m[1m"[0m[31m205[0m[31m[1m"[0m,
|
93
|
+
[31m[1m"[0m[31m206[0m[31m[1m"[0m,
|
94
|
+
[31m[1m"[0m[31m207[0m[31m[1m"[0m,
|
95
|
+
[31m[1m"[0m[31m208[0m[31m[1m"[0m,
|
96
|
+
[31m[1m"[0m[31m209[0m[31m[1m"[0m,
|
97
|
+
[31m[1m"[0m[31m210[0m[31m[1m"[0m,
|
98
|
+
[31m[1m"[0m[31m212[0m[31m[1m"[0m,
|
99
|
+
[31m[1m"[0m[31m213[0m[31m[1m"[0m,
|
100
|
+
[31m[1m"[0m[31m214[0m[31m[1m"[0m,
|
101
|
+
[31m[1m"[0m[31m215[0m[31m[1m"[0m,
|
102
|
+
[31m[1m"[0m[31m216[0m[31m[1m"[0m,
|
103
|
+
[31m[1m"[0m[31m217[0m[31m[1m"[0m,
|
104
|
+
[31m[1m"[0m[31m218[0m[31m[1m"[0m,
|
105
|
+
[31m[1m"[0m[31m219[0m[31m[1m"[0m,
|
106
|
+
[31m[1m"[0m[31m220[0m[31m[1m"[0m,
|
107
|
+
[31m[1m"[0m[31m224[0m[31m[1m"[0m,
|
108
|
+
[31m[1m"[0m[31m225[0m[31m[1m"[0m,
|
109
|
+
[31m[1m"[0m[31m227[0m[31m[1m"[0m,
|
110
|
+
[31m[1m"[0m[31m228[0m[31m[1m"[0m,
|
111
|
+
[31m[1m"[0m[31m229[0m[31m[1m"[0m,
|
112
|
+
[31m[1m"[0m[31m231[0m[31m[1m"[0m,
|
113
|
+
[31m[1m"[0m[31m234[0m[31m[1m"[0m,
|
114
|
+
[31m[1m"[0m[31m239[0m[31m[1m"[0m,
|
115
|
+
[31m[1m"[0m[31m240[0m[31m[1m"[0m,
|
116
|
+
[31m[1m"[0m[31m248[0m[31m[1m"[0m,
|
117
|
+
[31m[1m"[0m[31m251[0m[31m[1m"[0m,
|
118
|
+
[31m[1m"[0m[31m252[0m[31m[1m"[0m,
|
119
|
+
[31m[1m"[0m[31m253[0m[31m[1m"[0m,
|
120
|
+
[31m[1m"[0m[31m254[0m[31m[1m"[0m,
|
121
|
+
[31m[1m"[0m[31m256[0m[31m[1m"[0m,
|
122
|
+
[31m[1m"[0m[31m260[0m[31m[1m"[0m,
|
123
|
+
[31m[1m"[0m[31m262[0m[31m[1m"[0m,
|
124
|
+
[31m[1m"[0m[31m267[0m[31m[1m"[0m,
|
125
|
+
[31m[1m"[0m[31m269[0m[31m[1m"[0m,
|
126
|
+
[31m[1m"[0m[31m270[0m[31m[1m"[0m,
|
127
|
+
[31m[1m"[0m[31m272[0m[31m[1m"[0m,
|
128
|
+
[31m[1m"[0m[31m274[0m[31m[1m"[0m,
|
129
|
+
[31m[1m"[0m[31m276[0m[31m[1m"[0m,
|
130
|
+
[31m[1m"[0m[31m281[0m[31m[1m"[0m,
|
131
|
+
[31m[1m"[0m[31m283[0m[31m[1m"[0m,
|
132
|
+
[31m[1m"[0m[31m301[0m[31m[1m"[0m,
|
133
|
+
[31m[1m"[0m[31m302[0m[31m[1m"[0m,
|
134
|
+
[31m[1m"[0m[31m303[0m[31m[1m"[0m,
|
135
|
+
[31m[1m"[0m[31m304[0m[31m[1m"[0m,
|
136
|
+
[31m[1m"[0m[31m305[0m[31m[1m"[0m,
|
137
|
+
[31m[1m"[0m[31m307[0m[31m[1m"[0m,
|
138
|
+
[31m[1m"[0m[31m308[0m[31m[1m"[0m,
|
139
|
+
[31m[1m"[0m[31m309[0m[31m[1m"[0m,
|
140
|
+
[31m[1m"[0m[31m310[0m[31m[1m"[0m,
|
141
|
+
[31m[1m"[0m[31m312[0m[31m[1m"[0m,
|
142
|
+
[31m[1m"[0m[31m313[0m[31m[1m"[0m,
|
143
|
+
[31m[1m"[0m[31m314[0m[31m[1m"[0m,
|
144
|
+
[31m[1m"[0m[31m315[0m[31m[1m"[0m,
|
145
|
+
[31m
|
metadata
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rest_countries
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Mae Ann Sacedon Cimafranca
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-05-08 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: faraday
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.7'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.7'
|
27
|
+
description: 'Get information about countries via a RESTful API. Current version:
|
28
|
+
3.1. You can access API through https://restcountries.com/v3.1/all but in order
|
29
|
+
to get a faster response, you should filter the results by the fields you need.'
|
30
|
+
email:
|
31
|
+
- cimafrancamae@gmail.com
|
32
|
+
executables: []
|
33
|
+
extensions: []
|
34
|
+
extra_rdoc_files: []
|
35
|
+
files:
|
36
|
+
- ".rspec"
|
37
|
+
- ".standard.yml"
|
38
|
+
- CHANGELOG.md
|
39
|
+
- CODE_OF_CONDUCT.md
|
40
|
+
- LICENSE.txt
|
41
|
+
- README.md
|
42
|
+
- Rakefile
|
43
|
+
- lib/rest_countries.rb
|
44
|
+
- lib/rest_countries/client.rb
|
45
|
+
- lib/rest_countries/error.rb
|
46
|
+
- lib/rest_countries/version.rb
|
47
|
+
- sig/rest_countries.rbs
|
48
|
+
- ting API Requests
|
49
|
+
homepage: https://github.com/cimafrancamae/rest_countries
|
50
|
+
licenses:
|
51
|
+
- MIT
|
52
|
+
metadata:
|
53
|
+
homepage_uri: https://github.com/cimafrancamae/rest_countries
|
54
|
+
source_code_uri: https://github.com/cimafrancamae/rest_countries
|
55
|
+
changelog_uri: https://github.com/cimafrancamae/rest_countries/blob/master/CHANGELOG.md
|
56
|
+
post_install_message:
|
57
|
+
rdoc_options: []
|
58
|
+
require_paths:
|
59
|
+
- lib
|
60
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
61
|
+
requirements:
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 3.0.0
|
65
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
requirements: []
|
71
|
+
rubygems_version: 3.5.3
|
72
|
+
signing_key:
|
73
|
+
specification_version: 4
|
74
|
+
summary: Rest Countries API Ruby Client
|
75
|
+
test_files: []
|