GovernmentResource (client.government)
Endpoints:
• government.getByCountryId
.get()
Get the government snapshot for a country.
Signature
await client.government.get(country_id: 'str') -> 'Government'
Parameters
| Name |
Type |
Default |
country_id |
str |
Required |
Return Models
Government
| Field |
Type |
Required |
_id |
string |
Optional |
__v |
integer |
Optional |
dates |
GovernmentDates |
Optional |
country |
string |
Optional |
countryId |
string |
Optional |
president |
string |
Optional |
vicePresident |
string |
Optional |
minOfDefense |
string |
Optional |
minOfEconomy |
string |
Optional |
minOfForeignAffairs |
string |
Optional |
congressMembers |
array[string] |
Optional |
GovernmentDates
| Field |
Type |
Required |
_id |
string |
Optional |
__v |
integer |
Optional |
announcementCreatedAts |
array[string] |
Optional |
.get_by_country_id()
Get government by country ID.
Signature
await client.government.get_by_country_id(country_id: 'str') -> 'Government'
Parameters
| Name |
Type |
Default |
country_id |
str |
Required |
Return Models
Government
| Field |
Type |
Required |
_id |
string |
Optional |
__v |
integer |
Optional |
dates |
GovernmentDates |
Optional |
country |
string |
Optional |
countryId |
string |
Optional |
president |
string |
Optional |
vicePresident |
string |
Optional |
minOfDefense |
string |
Optional |
minOfEconomy |
string |
Optional |
minOfForeignAffairs |
string |
Optional |
congressMembers |
array[string] |
Optional |
GovernmentDates
| Field |
Type |
Required |
_id |
string |
Optional |
__v |
integer |
Optional |
announcementCreatedAts |
array[string] |
Optional |
.invalidate_cache()
Clear the SWR cache for all resources.
Signature
await client.government.invalidate_cache() -> 'None'