import requests


def get_region(city_id):
    """
    Use to get regions' id which can be used as param to seach for stores.

    :param city_id: city's id which can be obtain from get_cities()
    :returns: A Dictionary of available regions in structure of {name, id}
    :raises None
    """
    page = requests.post("https://www.starbucks.com.tw/member/region.serx", data={"cid": city_id})
    return {each["regionName"]: each["regionId"] for each in page.json()[0]["region"]}