Click here to Skip to main content
15,918,808 members

Comments by muharrem altun (Top 5 by date)

muharrem altun 13-Nov-20 0:55am View    
thank you for your help. I found the solution:
dynamic model = JsonConvert.DeserializeObject<dynamic>(response1.Content.ToString());
var n = model.locations[0].name;
muharrem altun 13-Nov-20 0:50am View    
Thank you. I found the solution with your approach.
muharrem altun 13-Nov-20 0:41am View    
I tried you soulution but i got the error in this line: var n=model.locations[0].name;
The error message is : string 'does not contain a' location 'definition.
My json begins like this:
{ "locations": [ { "name": "accounts/103890250566243670362/locations/17566485131419324180", "storeCode": "006841020I01", "locationName": "İstikbal - ATAK TICARET", "primaryPhone": "(0312) 814 10 22", "primaryCategory": { "displayName": "Mobilya mağazası", "categoryId": "gcid:furniture_store" }, "websiteUrl": "http://www.istikbal.com.tr/", "regularHours": { "periods": [ { "openDay": "SUNDAY", "openTime": "09:00", "closeDay": "SUNDAY", "closeTime": "21:00" }, { "openDay": "MONDAY", "openTime": "09:00", "closeDay": "MONDAY", "closeTime": "21:00" }, { "openDay": "TUESDAY", "openTime": "09:00", "closeDay": "TUESDAY", "closeTime": "21:00" }, { "openDay": "WEDNESDAY", "openTime": "09:00", "closeDay": "WEDNESDAY", "closeTime": "21:00" }, { "openDay": "THURSDAY", "openTime": "09:00", "closeDay": "THURSDAY", "closeTime": "21:00" }, { "openDay": "FRIDAY", "openTime": "09:00", "closeDay": "FRIDAY", "closeTime": "21:00" }, { "openDay": "SATURDAY", "openTime": "09:00", "closeDay": "SATURDAY", "closeTime": "21:00" } ] }, "locationKey": { "placeId": "ChIJux7UUUVwgkAR4AuSDLY30hY", .....
muharrem altun 11-Nov-20 5:19am View    
Hi Richard,
I tried with two parameter data and it gives the same result. I did not give the location code, postman gives me:

{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.mybusiness.v4.ValidationError",
"errorDetails": [
{
"code": 2,
"field": "language_code",
"message": "language_code is required"
}
]
}
]
}
}

If i give the language code for example tr-TR, it gives me:
{
"error": {
"code": 400,
"message": "Invalid JSON payload received. Unknown name \"language_code\": Cannot bind query parameter. Field 'language_code' could not be found in request message.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"description": "Invalid JSON payload received. Unknown name \"language_code\": Cannot bind query parameter. Field 'language_code' could not be found in request message."
}
]
}
]
}
}
The content type ı wrote is application/json.
Whent ı change the content type to application/gRPC
postmane gices me nothing but the status is 200.
However nothing is created.
muharrem altun 29-Oct-20 6:33am View    
İ am not hacker. Our company has more thean 1500 firms that sell our furnitures. These firms are located in google and we want to add, delete, update these firms using google api s. We try ourselves about it in google playground. In the playground firstly, the code can be get created when the url is given. After that the token can be get by using this code. If you have the google my bussiness ccount, you can try and see this. So we can not get the code, and the token