'Returns a Category for the passed ID, associated with this API object.'

def get_category(self, id, name=None):

    id = int(id)
    if (id in self.cached_categories.keys()):
        cat = self.cached_categories[id]
    else:
        cat = Category(id, self)
    if name:
        cat.name = name
    return cat
