yandex-api

Getting street name from json for different types of settlements

有些话、适合烂在心里 提交于 2020-07-23 08:05:27
问题 I am feeding yandex geokoder service with a list of address lines that are within one city but sometimes they are in different settlements within that city: city Moscow, Yegora Abakumova Street, 9 city Moscow, Moskovskiy Settlement, Village Lapshinka, вл8к1 city Moscow, city Zelenograd, bld 438 city Moscow, Moskovskiy Settlement, Village Lapshinka, вл8к1 (I am sending addresses in russian language, they are translated above). I need to get the street name from API response in json, which

Getting street name from json for different types of settlements

核能气质少年 提交于 2020-07-23 08:04:25
问题 I am feeding yandex geokoder service with a list of address lines that are within one city but sometimes they are in different settlements within that city: city Moscow, Yegora Abakumova Street, 9 city Moscow, Moskovskiy Settlement, Village Lapshinka, вл8к1 city Moscow, city Zelenograd, bld 438 city Moscow, Moskovskiy Settlement, Village Lapshinka, вл8к1 (I am sending addresses in russian language, they are translated above). I need to get the street name from API response in json, which

Getting street name from json for different types of settlements

一曲冷凌霜 提交于 2020-07-23 08:03:08
问题 I am feeding yandex geokoder service with a list of address lines that are within one city but sometimes they are in different settlements within that city: city Moscow, Yegora Abakumova Street, 9 city Moscow, Moskovskiy Settlement, Village Lapshinka, вл8к1 city Moscow, city Zelenograd, bld 438 city Moscow, Moskovskiy Settlement, Village Lapshinka, вл8к1 (I am sending addresses in russian language, they are translated above). I need to get the street name from API response in json, which

WebDAV get free space info

落花浮王杯 提交于 2019-12-23 16:27:59
问题 I'm working with Yandex Disk API (http://api.yandex.com/disk/doc/dg/reference/propfind_space-request.xml). Having trouble with adding property in the request body ( quota-available-bytes and quota-used-bytes ) public static string SpaceInfo(string path) { // Authorization. HttpWebRequest webReq = (HttpWebRequest)WebRequest.Create("https://webdav.yandex.ru/"); webReq.Accept = "*/*"; webReq.Headers.Add("Depth: 0"); webReq.Headers.Add("Authorization: OAuth " + token); webReq.Method = "PROPFIND";

Yandex API Translator error - 401 API key is invalid

让人想犯罪 __ 提交于 2019-12-13 17:57:53
问题 I registered with Yandex and got a Translate API Key. However when I try to translate with the following code: <CFSET Key = "trnsl.1.1.2014091..........................."> <CFSET lang="en-de"> <CFSET text="Hallo World"> <CFHTTP URL="https://translate.yandex.net/api/v1.5/tr.json/translate?Key=#Key#&lang=#lang#&text=#text#" METHOD = "GET"> </CFHTTP> <CFOUTPUT>#CFHTTP.FileContent#</CFOUTPUT> I get a 401 error "API key is invalid". I also tried with Javascript/CFML but got a similar result. I

SWIFT Translator App

坚强是说给别人听的谎言 提交于 2019-12-13 05:06:38
问题 I create translator using Yandex api. I use this function: func getTranslate(text: String, lang: String, completion: @escaping (Translation?) -> Void) { guard let url = URL(string: translateUrl + "?key=\(key)&text=\(text)&lang=\(lang)&format=plain&options=1") else { return } var request = URLRequest(url: url) request.httpMethod = "POST" URLSession.shared.dataTask(with: request) { (data, response, error) in if let error = error { print(error.localizedDescription) completion(nil) return } guard

How to put in Yandex translation API in an android application?

心不动则不痛 提交于 2019-12-12 03:43:13
问题 How do I make my android application translate from English to Hindi using Yandex translator? Java API and JSON file. I have got the API key and I've no idea what codes are to be written to include the API and make it work. It will be really helpful if you post the entire code :D Thanks. 回答1: You can check this API: https://github.com/DoguD/Yandex-Translate-Android-API Just import TranslatorBackgroundTask.java file to your application and then execute as shown below: import co.oriens.yandex

select an xml element, ignore element name, print newline

人走茶凉 提交于 2019-12-07 15:32:39
问题 I'd like to select the first element, but ignore its name in the output. This is what I'm getting, after requesting the first url element from each input xml file: % xmllint \ --xpath '(//yandexsearch/response/results/grouping/group/doc/url)[1]' \ *.response.ya.xml <url>https://example.com/</url><url>https://example.net/</url><url>https://example.org/</url> But this is what I want instead: https://example.com/ https://example.net/ https://example.org/ Note that the idea is to select the value