I'll introduce rapidapi to you
First,let's use spellcheck api.
This is request code with ruby. Thanks to rapidapi,I didn't programming beacuse rapidapi makes us some request codes.
response = Unirest.get "https://montanaflynn-spellcheck.p.mashape.com/check/?text=This+sentnce+has+some+probblems.",
headers:{
"X-Mashape-Key" => "k7Nu0z8XmsmshQuVytz2jTawZyYBp1SNCfdjsnkXPqO1iR7zOi",
"X-Mashape-Host" => "montanaflynn-spellcheck.p.mashape.com"
}
Then Response
Very Convenient!
Not only makes us some request codes, rapidapi makes us request code, but also we can make request code in similar notation by rapidapi gem. So, we don't have to study how to request to some apis which you wanna use.
Second I'll use the rapidapi gem which I told you the very convenient thing.
I'll give azure computer vision a picture of Michael Jackson
Of course,you know he was one of the human,wan't he? haha so if the api response tags that are like human,mammalian,at least animal that is alright.
#gem 'rapidapi', '~> 0.1.2'
require 'rapidapisdk'
RapidAPI.config(project: "default-application_592fcbb3e4b08ab68dbc32a9", token: "b953f151-8e55-44d3-b8e6-1dfa36b42fd5")
response = RapidAPI.call('MicrosoftComputerVision', 'analyzeImage', {
'subscriptionKey': '30',
'image': 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTM1NjExNjg1OV5BMl5BanBnXkFtZTcwMTQ0NzIwMw@@._V1_UY317_CR1,0,214,317_AL_.jpg',
'details': '',
'visualFeatures': ''
})
Then Response
Last
Rapidapi is very convenient but there aren't some api which we wanna use. In those cases,you should suggest to Rapidapi which is suggestion forms.
I'm a 16 year old, high school student in Japan,so if there are some mistakes like grammatical,or program,please give me some comments.
コメント
コメントを投稿