Redian新闻
>
问个关于autocomplete的问题
avatar
问个关于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.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。