add PHP api client
migrate queryBuckets
migrate card api
migrate card moving/upgrading/downgrading api