将变量id发送到api以获取用户

时间:2016-04-22 11:01:21

标签: ios swift api alamofire swifty-json

我有这个API用于通过id

获取用户
http://api.programize.me/2/projects/lawyer/api/v0/lawyer/show/{id}/{token}

当我尝试发送我的用户ID时显示此错误

Instance member cannot be used on type "my viewController name"

我写这样的API:

http://api.programize.me/2/projects/lawyer/api/v0/lawyer/show/\(lawyerId)/{token}

lawyerId它是来自另一个viewController的我的用户ID的var ,将ID发送到我的API的正确方法是什么?

0 个答案:

没有答案