{"id":17268135,"url":"https://github.com/kingdarboja/iridium","last_synced_at":"2025-07-27T00:35:04.646Z","repository":{"id":55673741,"uuid":"273956519","full_name":"KingDarBoja/Iridium","owner":"KingDarBoja","description":"The International Standard for country codes and codes for their subdivisions on Nim","archived":false,"fork":false,"pushed_at":"2020-12-26T21:12:25.000Z","size":292,"stargazers_count":9,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T16:17:52.853Z","etag":null,"topics":["countries","iso-3166","nim-lang","work-in-progress"],"latest_commit_sha":null,"homepage":"","language":"Nim","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KingDarBoja.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-21T17:55:15.000Z","updated_at":"2024-09-12T13:20:03.000Z","dependencies_parsed_at":"2022-08-15T06:10:34.424Z","dependency_job_id":null,"html_url":"https://github.com/KingDarBoja/Iridium","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/KingDarBoja/Iridium","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KingDarBoja%2FIridium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KingDarBoja%2FIridium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KingDarBoja%2FIridium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KingDarBoja%2FIridium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KingDarBoja","download_url":"https://codeload.github.com/KingDarBoja/Iridium/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KingDarBoja%2FIridium/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267276978,"owners_count":24063219,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["countries","iso-3166","nim-lang","work-in-progress"],"created_at":"2024-10-15T08:12:35.477Z","updated_at":"2025-07-27T00:35:04.628Z","avatar_url":"https://github.com/KingDarBoja.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Iridium\nThe International Standard for country codes and codes for their subdivisions on Nim (ISO-3166).\n\n[![](https://img.shields.io/badge/Nimble-0.3.2-yellow?style=flat-square\u0026logo=nim)](https://nimble.directory/pkg/iridium)\n[![GitHub issues](https://img.shields.io/github/issues/KingDarBoja/Iridium?style=flat-square)](https://github.com/KingDarBoja/Iridium/issues)\n[![GitHub stars](https://img.shields.io/github/stars/KingDarBoja/Iridium?style=flat-square)](https://github.com/KingDarBoja/Iridium/stargazers)\n\n## Usage\n\n```nim\n\u003e\u003e\u003e import iridium\n\u003e\u003e\u003e echo getCountryByCode(\"CO\")\n(name: \"Colombia\", alpha2: \"CO\", alpha3: \"COL\", numeric: \"170\", official: \"Republic of Colombia\")\n\u003e\u003e\u003e echo getSubdivisionByCode(\"CO-QUI\")\n(name: \"Quindío\", category: \"Department\", parent: \"\")\n```\n\n## Install\n\n```console\nnimble install iridium\n```\n\n## Requisites\n\n- [Nim 1.2.0](https://nim-lang.org/) or higher.\n\n## Documentation\n\n### **Types**\n\nThe country data is stored as a *CountryDivision* object with the following fields:\n```Nim\ntype\n  CountryDivision* = object\n    name*: string       ## Country name (short)\n    alpha2*: string     ## Two letter alphabetic code of the country\n    alpha3*: string     ## Three letter alphabetic code of the country\n    numeric*: string    ## Three digit numeric code of the country, including leading zeros\n    official*: string   ## Official name of the country (optional)\n```\n\nThe country subdivision is stored as a *CountrySubdivision* object with the following fields:\n\n```nim\ntype\n  CountrySubdivision* = object\n    name*: string        ## Name of the country subdivision\n    category*: string    ## Type of subdivision of the country (i.e. Province, Region, Emirate)\n    parent*: string      ## Parent of the country subdivision\n```\n\n### **Procedures**\n\nEach procedure will raise a `KeyError` if the code does not satisfy certain checks (i.e. code does not exist, invalid numeric code).\n\n#### ISO-3166-1 Related\n\n- **getAllCountries()**\n\n  Get all the countries data as a Nim Table whose keys are the country alpha2 code and the values as CountryDivision object.\n\n  - **Arguments**: None\n  - **Returns**: `Table[string, CountryDivision]`\n\n- **getCountryByCode()**\n\n  Get the country data by its alpha2 code.\n\n  - **Arguments**:\n    - `code` ISO-3166-1 alpha2 code, required.\n  - **Returns**: `CountryDivision`\n\n- **getCountryByName()**\n\n  Get the country data by its name.\n\n  - **Arguments**:\n    - `countryName` The common name, required.\n  - **Returns**: `CountryDivision`\n\n- **getCountryByAlpha3()**\n\n  Get the country data by its alpha3 code.\n\n  - **Arguments**:\n    - `alpha3Code` ISO-3166-1 alpha3 code, required.\n  - **Returns**: `CountryDivision`\n\n- **getCountryByNumeric()**\n\n  Get the country data by its numeric code.\n\n  - **Arguments**:\n    - `numericCode` ISO-3166-1 numeric code as string or integer, required.\n  - **Returns**: `CountryDivision`\n\n\n#### ISO-3166-2 Related\n\n- **getAllSubdivisions()**\n\n  Get all the subdivisions data as a Nim Table whose keys are the subdivision code *(country-subdivision)* and the values as CountrySubdivision object.\n\n  - **Arguments**: None\n  - **Returns**: `Table[string, CountrySubdivision]`\n\n- **getSubdivisionsByCountry()**\n\n  Get the country subdivisions data by its code as a sequence.\n\n  - **Arguments**:\n    - `countryCode` ISO-3166-1 alpha2 country code as string, required.\n  - **Returns**: `seq[CountrySubdivision]`\n\n- **getSubdivisionByCode()**\n\n  Get the subdivision data by its code.\n\n  - **Arguments**:\n    - `numericCode` ISO-3166-2 code as string, required.\n  - **Returns**: `CountrySubdivision`\n\n\n#### ISO-4217 Related\n\n- **getAllCurrencies()**\n\n  Get all the currencies as a Nim table whose keys are the currency alphabetic code and the values as CurrencyCode object.\n\n  - **Arguments**: None\n  - **Returns**: `Table[string, CurrencyCode]`\n\n- **getCurrencyByCode()**\n\n  Get the currency data by its alphabetic code.\n\n  - **Arguments**:\n    - `code` ISO-4217 alphabetic code as string, required.\n  - **Returns**: `CurrencyCode`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkingdarboja%2Firidium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkingdarboja%2Firidium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkingdarboja%2Firidium/lists"}