Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding functionality for Full Currency Name look up #14

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Connor-Steward
Copy link

What is the purpose of your pull request?

As per Issue: #12

To add functionality to the main class whereby you can get the full currency name.

Important

  • Added JSON file to 'currencies' folder called "currency_name.json"
  • This JSON file is a basic key/value setup
  • Most of these full name values should be the official/correct ones
  • Source is mainly Google preview after search, as well as https://www.worlddata.info/currencies

Useage

from currencies import Currency

currency = Currency('USD')

currency.getname()

>>> 'United States Dollar'

Other Info

Resolves #12 which can be closed now

This JSON file contains that key/value pair of Currency short label -> Full name

eg. "USD" : "United States Dollar"
Accidentally had whitespace in some of the Key values :( 

whoops
This adds new get_name() method, which will lookup the currency value and give back the full name of the currency. 

For example, give it "USD" and it returns "United States Dollar"
@Connor-Steward
Copy link
Author

Oh additionally, this is my first time contributing to a project so I'm not 100% sure I've done the fork/merge etc etc right

Please excuse anything I've missed :)

Copy link

@Draconomicon13 Draconomicon13 left a comment

Choose a reason for hiding this comment

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

  • [ ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding the currency Name
2 participants