You can simply make a request to this URL to get the JSON:
https://ghanamps.herokuapp.com
If you already have Go on your machine you can simply install this tool by running:
go install github.com/yeboahnanaosei/ghanamps/cmd/ghanamps@latestThis will install a binary ghanamps to the bin folder in your $GOPATH.
-
Go to the releases page and download the appropriate binary for your system.
-
Extract the binary from the zip archive
-
Put the binary in your PATH environment variable and make sure it is executable (Linux & macOS)
If you don't know how to do this, here is a useful link to guide you: https://zwbetz.com/how-to-add-a-binary-to-your-path-on-macos-linux-windows/
-
Launch your command prompt and run:
ghanamps membersfor all membersghanamps leadersfor all leadersghanamps -hfor help
The tool has two subcommands:
members for handling members
leaders for handling the leaders
To get members you can run the tool by simply issuing the following command from your terminal.
ghanamps membersThis will return a JSON array of all the current members of Ghana's parliament. Example below:
[
{
"name": "ADAMA SULEMANA",
"party": "NDC",
"constituency": "TAIN CONSTITUENCY",
"region": "BONO REGION",
"photo": "https://www.parliament.gh/epanel/mps/photos/198.jpg",
"profile": "https://www.parliament.gh/mps?mp=198"
},
{
"name": "ADELAIDE NTIM",
"party": "NPP",
"constituency": "NSUTA/KWAMAN BEPOSO CONSTITUENCY",
"region": "ASHANTI REGION",
"photo": "https://www.parliament.gh/epanel/mps/photos/164.jpg",
"profile": "https://www.parliament.gh/mps?mp=164"
},
{
"name": "AGNES NAA MOMO LARTEY",
"party": "NDC",
"constituency": "KROWOR CONSTITUENCY",
"region": "GREATER ACCRA REGION",
"photo": "https://www.parliament.gh/epanel/mps/photos/64.jpg",
"profile": "https://www.parliament.gh/mps?mp=64"
},
{
"name": "AKWASI DARKO BOATENG",
"party": "NPP",
"constituency": "BOSOME FREHO CONSTITUENCY",
"region": "ASHANTI REGION",
"photo": "https://www.parliament.gh/epanel/mps/photos/133.jpg",
"profile": "https://www.parliament.gh/mps?mp=133"
},
{
"name": "AKWASI KONADU",
"party": "NPP",
"constituency": "MANHYIA NORTH CONSTITUENCY",
"region": "ASHANTI REGION",
"photo": "https://www.parliament.gh/epanel/mps/photos/145.jpg",
"profile": "https://www.parliament.gh/mps?mp=145"
}
...
]To get members of a particular party, you can issue the following command:
ghanamps members -party nppghanamps members -party ndcghanamps members -party independentTo get the leadership of parliament, you can run the tool by simply issuing the following command from your terminal:
ghanamps leadersThis will return a JSON array of all the current leaders of Ghana's parliament. Example below:
[
{
"name": "Rt. Hon. Alban Sumana Kingsford Bagbin",
"title": "Speaker of Parliament",
"photo": "https://www.parliament.gh/epanel/mps/leaders/MrSpeaker.jpg"
},
{
"name": "Hon. Joseph Osei-Owusu",
"title": "First Deputy Speaker",
"photo": "https://www.parliament.gh/epanel/mps/photos/132.jpg"
},
{
"name": "Hon. Andrew Asiamah Amoako",
"title": "Second Deputy Speaker",
"photo": "https://www.parliament.gh/epanel/mps/photos/128.jpg"
},
...
]Of course! Ideas, suggestions, additions are all welcome. Read this