问个关于autocomplete的问题# JobHunting - 待字闺中
i*r
1 楼
题目如下,这个题目的意思是,在搜索的box里面输入字符,高亮提示可能输入结果?
按下“搜索”这个button,然后显示推荐的结果吗?
那么 “With the following params:......”这一段是什么意思呢?这些参数,是用
来搜索的吗?其中“Keep the value as “100266a” ,在api里面也没有这一个参数
啊?
恳请大家指点,谢谢。
VIki has a simple autocomplete api. Example: https://api.viki.io/v4/search.
json?c=boys&per_page=5&with_people=true&app=100266a&t=1440586215
With the following params:
c: The search string
per_page: number of results to return, keep the value at “5”
with_people: Flag to indicate search result to include celebrity items
app: ID of application making the call. Keep the value as “100266a“
t: Timestamp
A typical item return in the search is as follows:
{
id: "50c",
t: "series",
tt: "Boys Over Flowers",
u:
{
w: "/tv/50c-boys-over-flowers",
a: "/v4/series/50c.json"
},
i: "http://0.viki.io/c/ed0/16e/06d/boys-over-flowers_590x330.jpg?x=b",
e: 25,
oc: "kr",
te: "Niños antes que flores",
tj: "花より男子(韓国版)",
tf: "Boys Over Flowers",
owner: "3co",
blocked: false,
blocking:
{
geo: false,
paywall: false
}
}
The payload explained:
id: ID of the item
t: type of the item
tt: Title of the item in English
u: URL, where “w” is the url path and “a” is the api url
i: The image of the item
e: number of episodes (for series)
oc: Origin Country. The country the show is from. 2 characters country code
te: title in Spanish
tj: title in Japanese
tf: title in French
owner: The owner code of the item. Ignore.
blocked: Flag to indicate if the item is viewable by the requsting user
blocking: Hash to indicate the reason of blocking. Ignore.
The exercise is to implement a search box with autocomplete.
按下“搜索”这个button,然后显示推荐的结果吗?
那么 “With the following params:......”这一段是什么意思呢?这些参数,是用
来搜索的吗?其中“Keep the value as “100266a” ,在api里面也没有这一个参数
啊?
恳请大家指点,谢谢。
VIki has a simple autocomplete api. Example: https://api.viki.io/v4/search.
json?c=boys&per_page=5&with_people=true&app=100266a&t=1440586215
With the following params:
c: The search string
per_page: number of results to return, keep the value at “5”
with_people: Flag to indicate search result to include celebrity items
app: ID of application making the call. Keep the value as “100266a“
t: Timestamp
A typical item return in the search is as follows:
{
id: "50c",
t: "series",
tt: "Boys Over Flowers",
u:
{
w: "/tv/50c-boys-over-flowers",
a: "/v4/series/50c.json"
},
i: "http://0.viki.io/c/ed0/16e/06d/boys-over-flowers_590x330.jpg?x=b",
e: 25,
oc: "kr",
te: "Niños antes que flores",
tj: "花より男子(韓国版)",
tf: "Boys Over Flowers",
owner: "3co",
blocked: false,
blocking:
{
geo: false,
paywall: false
}
}
The payload explained:
id: ID of the item
t: type of the item
tt: Title of the item in English
u: URL, where “w” is the url path and “a” is the api url
i: The image of the item
e: number of episodes (for series)
oc: Origin Country. The country the show is from. 2 characters country code
te: title in Spanish
tj: title in Japanese
tf: title in French
owner: The owner code of the item. Ignore.
blocked: Flag to indicate if the item is viewable by the requsting user
blocking: Hash to indicate the reason of blocking. Ignore.
The exercise is to implement a search box with autocomplete.