Skip to content

Commit

Permalink
v1.3.0; updating version and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
amckenna41 committed Dec 12, 2023
1 parent f8e1ac0 commit dc18ae3
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion API.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

The main API endpoint is:

> https://iso3166-2-api.vercel.app/api
> [https://iso3166-2-api.vercel.app/api](https://iso3166-2-api.vercel.app/api)
The other endpoints available in the API are:
* https://iso3166-2-api.vercel.app/api/all
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
The main API homepage and documentation is available via the URL:

> https://iso3166-2-api.vercel.app/api
> [https://iso3166-2-api.vercel.app/api](https://iso3166-2-api.vercel.app/api)
Table of Contents
-----------------
Expand Down
2 changes: 1 addition & 1 deletion ToDo.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
- [X] Split up 'filter' section in api.md into 3 sections.
- [X] Add app.url_map.strict_slashes = False
- [X] Update comments to include v1/v2.
- [ ] Add local name attribute to object.
- [X] Add local name attribute to object.
- [X] Attributes section should just contain list of attributes.
- [X] Update version and last updated.

Expand Down
6 changes: 3 additions & 3 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
<div class="content-infos">
<!-- version and last updated info -->
<div class="info" id="version"><b>Version:</b> 1.3.0</div>
<div class="info" id="last-updated"><b>Last Updated:</b> November 2023</div>
<div class="info" id="author"><b>Author/Maintainer:</b> <a href="https://github.com/amckenna41/" target="_blank">AJ</a></div>
<div class="info" id="last-updated"><b>Last Updated:</b> December 2023</div>
<div class="info" id="author"><b>Developer/Maintainer:</b> <a href="https://github.com/amckenna41/" target="_blank">AJ</a></div>
</div>
<!-- list of available sections in API documentation -->
<ul id="section-list-menu">
Expand Down Expand Up @@ -89,7 +89,7 @@ <h1>Attributes</h1>
<li>Type - subdivision type e.g. region, state, canton, parish etc.</li>
<li>Parent code - the parent regional/subdivision code for subdivision, if applicable.</li>
<li>Latitude/Longitude - the coordinates for the subdivision, using Google Maps API.</li>
<li>Flag - URL for subdivision flag (from iso3166-flag-icons repo), if applicable.</li>
<li>Flag - URL for subdivision flag (from <a href="https://github.com/amckenna41/iso3166-flag-icons" target="_blank">iso3166-flag-icons</a> repo), if applicable.</li>
</ul>
</p>
</div>
Expand Down
5 changes: 3 additions & 2 deletions tests/test_iso3166_2_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def setUp(self):

#base url for subdivision flag icons
self.flag_base_url = "https://github.com/amckenna41/iso3166-flag-icons/blob/main/iso3166-2-icons/"


@unittest.skip("")
def test_homepage_endpoint(self):
""" Testing contents of main "/api" endpoint that returns the homepage and API documentation. """
test_request_main = requests.get(self.api_base_url, headers=self.user_agent_header)
Expand All @@ -53,7 +54,7 @@ def test_homepage_endpoint(self):
author = soup.find(id='author').text.split(': ')[1]

self.assertEqual(version, "1.3.0", "Expected API version to be 1.3.0, got {}.".format(version))
self.assertEqual(last_updated, "November 2023", "Expected last updated data to be November 2023, got {}.".format(last_updated))
self.assertEqual(last_updated, "December 2023", "Expected last updated data to be December 2023, got {}.".format(last_updated))
self.assertEqual(author, "AJ", "Expected author to be AJ, got {}.".format(author))
#2.)
section_list_menu = soup.find(id='section-list-menu').find_all('li')
Expand Down

1 comment on commit dc18ae3

@vercel
Copy link

@vercel vercel bot commented on dc18ae3 Dec 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

iso3166-2-api – ./

iso3166-2-api-amckenna41.vercel.app
iso3166-2-api-git-main-amckenna41.vercel.app
iso3166-2-api.vercel.app

Please sign in to comment.