I would like to search for all notes with reminder_time today. I use the following search query for this purpose:
reminderTime:day -reminderTime:day+1
If I use it in the Evernote client everything works fine. But if I use the findNotesMetadata function in the word field in the NoteFilter parameter I also get notes with reminder tomorrow. The official API documentation says for the word field in the NoteFilter-struct:
If present, a search query string that will filter the set of notes to be returned. Accepts the full search grammar documented in the Evernote API Overview.
The problem was that the notebook filter wasn't working correctly for business accounts. This was caused by a bug (slash not-implemented feature) in the Evernote service where the notebook:"notebookName" feature wasn't implemented in the Evernote service. It has now been implemented, and everything works perfectly.
There is still a difference in the API and the Evernote view. I want to search all notes created today. As the API documentation says the query is:
created:day
From the API I get all notes created from today 9:00 until tomorrow 8:59 (tomorrow date is manually changed in the note meta data). So I get the time interval from today for PST time zone, but I'm in Europe/Berlin, which explains a time difference of 9 hours between my location and Evernotes headquarter.
If I run the same query in Evernote Mac Client or the Evernote web client I get the correct notes from today in my time zone. In the Evernote Account, the correct time zone is stored.
Using the API, the concept of "days" will use UTC when searching for notes - we don't take the User.timezone field into account. When you use a client eg the web or mac client, the current time zone will be taken from the system when interpreting a search query.
Related
we have a really strange phenomenon with our team's Cosmos DB.
According to the documentation, every document in cosmos DB has a timestamp property named _ts which is updated using Azure CosmosDB core functionality every time a document is created/updated (even partial update).
We have modeled our code to use this field as a last update time field, and every time we update/create a document, we expect this field to change accordingly.
Lately, we've started to see a strange phenomenon on which for some documents that we updated using patch operation (partial update) - the _ts field hasn't been changed at all.
It's important to mention that it happens for some and not for all the documents we patch which makes it even stranger.
For example, we've created a document with some unique id and updated it multiple times using patch operations.
It turned out that the timestamp value of the _ts field had kept as it was when we created the document
We are doing the updates using a .net core job deployed in a k8s cluster with the latest .net core SDK Nuget version of CosmosDB, and we have no idea how to move forward from here.
Will appreciate your assistance.
Edit: An example for the code I use:
var patchOperations = new List<PatchOperation>();
patchOperations.Add(PatchOperation.Replace($"/{nameof(DeploymentState)}", DeploymentState.PendingRemoval));
patchOperations.Add(PatchOperation.Replace($"/{nameof(ExecutionId)}", executionId));
container.PatchItemAsync<State>(modelId, new PartitionKey(partitionKey), patchOperations, cancellationToken: ct).ConfigureAwait(false);
I had created a bot using bot framework composer and integrated it with MS Teams with help of the azure web app.
Now I need to get the login user(MS Team) information i.e. the user who using the bot.
I need to get the user information and log it in the azure application insights using Bot Framework Composer.
Can anyone help me with it?
Get UserID from ${turn.activity.aadObjectId}
Get more user information by Microsoft Graph: https://learn.microsoft.com/en-us/graph/api/user-get?view=graph-rest-1.0&tabs=http
In MS Teams, with each new interaction with the bot, a "conversation Update activity" is first sent to the bot, this is what triggers the welcome greeting. You get back the following context in the returned JSON - in the Turn.Activity memory scope.
...snip...
"serviceUrl":"https://smba.trafficmanager.net/emea/",
"channelId":"msteams",
"from":{
"id":"<<Unique MS Teams Identifier for the end user>>",
"name":"<<AAD firstname surname is returned here>>",
"aadObjectId":"<<GUID is returned here>>",
"role":"user"
},
...snip...
You can Use the aadObjectId to query the MS Graph using an HTTPRequest if you want to get further info. Or just use the persons "name" field (which is from AAD) if that is good enough.
I am moving from Google to Here-Api Geocoding service.I need to implement batch geocoding using HERE Batch Geocoder API. Till now I am able to get almost all of the needed info from Batch Geocoder API. However, I am not able to find a way to get TimeZone info in Batch Geocoder API response.
For example,I was able to get Timezone object through Here Forward Geocoding API- by set query parameters 'gen=9&&locationattributes=adminInfo,timeZone', but this two APIs-Geocoding and Batch Geocoder API seems to work slightly different.
I tried various combinations of query params using this generic URL:
http://batch.geocoder.cit.api.here.com/6.2/jobs?action=run&app_code=[your-app-code]&app_id=[your-app-id]&gen=8&header=true&indelim=|&outdelim=|&outcols=displayLatitude,displayLongitude,navigationLatitude,navigationLongitude,mapViewTopLeftLatitude,mapViewTopLeftLongitude,mapViewBottomRightLatitude,mapViewBottomRightLongitude,locationLabel,houseNumber,street,district,city,county,state,postalCode,country,relevance,matchLevel,matchType,matchCode,mapReferenceId,responseAdditionalData,addressAdditionalData&addressattributes=all&locationattributes=all&responseattributes=all&maxresults=5&outputcombined=true&mailto=[yourname#domain.com]
I took it from a response here:
How and what do responseattributes return for the Here Batch Geocoder API?
However, neither in posted URL nor in HERE Api documentation I found a way to include in "outcols" information for Timezone(i need only the TimeZone Id anyway).My logic is basically that if params gen=9 and locationattributes=adminInfo,timeZone are set it should work in Batch geocoding(as it works in Forward Geocoding API).
Looking at the documentation it seems to me that Timezone info is not included in batch geocoding response at all, which is a problem for me since I need Timezone Id and in this way after Batch geocoding I need to make request for each entry to set Timezone id.
In short, I need to take TimeZone info(TimeZone Id) from HERE Batch Geocoder API
The BatchGeocoder Service does not support time zones only the Geocoder Service does support this right now.
Is there any difference in patch api in embedded and standard version of the server?
Is there a need to configure document store in some way to enable patch api?
I'm writing a test which use embedded raven. The code works correctly on the standard version but in test it doesn't. I'm constantly receiving patch result: DocumentDoesNotExists. I`ve checked with debugger and the document exists in the store - so it is not a problem with test.
Here you can find a repro of my issue: https://gist.github.com/pblachut/c2e0e227fa3beb51f4f9403505c292bb
I`ve reached the contact in the ravendb support and I have answer for my question.
There should be no difference between embedded and normal version of the server. The problem was that I did not passed explicitly for which database I want to invoke batch command. In the result I tried to patch document in system database.
var result = await documentStore.AsyncDatabaseCommands.ForDatabase("testDb).BatchAsync(new[] {command});
I assumed that database name will be taken from the session (beacuse I get documentStore from there). But the name of database should be always passed.
var documentStore = session.Advanced.DocumentStore;
I am unable to use Google Maps AutoComplete. I have read all the articles about this problem, and I still get REQUEST_DENIED:
The following services are turned ON:
Google Maps API v3
Places API
Prediction API
Simple API Access:
API key: **
Referers: Any referer allowed
Activated on: (A few days ago)
Activated by: ** – you
I have even activated my credit card (don't know if that makes a difference for traffic under the quota):
The following happens (tested both from a browser and command line cURL):
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=New&types=(cities)&key=$apikey
{
"predictions" : [],
"status" : "REQUEST_DENIED"
}
How do I make this work?
From the documentation
Required parameters
input — The text string on which to search. The Place service will return candidate matches based on this string and order results based on their perceived relevance.
sensor — Indicates whether or not the Place request came from a device using a location sensor (e.g. a GPS) to determine the location sent in this request. This value must be either true or false.
key — Your application's API key. This key identifies your application for purposes of quota management. Visit the APIs Console to select an API Project and obtain your key. Maps API for Business customers must use the API project created for them as part of their Places for Business purchase.
I don't see "sensor" in your example request.