Skip to content

Conversation

@con-dev123
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

Connor Steward added 3 commits August 13, 2021 02:50
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"
@con-dev123
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