$expand doesn't work after migration and code is first - asp.net-web-api

could not find a property named on type odata when expand property in uri
enter image description here
The query specified in the URI is not valid. Could not find a property named 'wallet_client_branch' on type 'System.Web.OData.Query.Expressions.SelectAllAndExpand_1Of

Related

Google Drive API Listing Files with Field Paramter Not Working

I am currently listing some files with the Google Drive API. However, the default list only lists id, name, and mimeType. I know that the fields parameter can list more than just the default, but when I put parents as a field in the Google API Playground, I get the error of Invalid field selection parents. However, when I use * in the fields parameter, it returns all the fields. Am I doing anything wrong by putting parents in the fields parameter? If so, does anyone have any idea how to include the parents field as a field in the list results?
Here is my current endpoint, which causes the error:
https://www.googleapis.com/drive/v3/files?fields=parents&key=[YOUR_API_KEY]
Thanks!
From https://www.googleapis.com/drive/v3/files?fields=parents&key=[YOUR_API_KEY], in your situation, when parents is directly put to fields as follows,
such error of Invalid field selection parents occurs. Because the method of "Files: list" returns the file list which is an array including each file metadata. Ref I think that this is the reason of your issue.
Solution:
So in this case, please set files(parents) instead of parents.
Note:
In the case of files(parents), only parents is returned. When you want to retrieve id, name, mimeType and parents, please use files(id,name,mimeType,parents) to fields.
References:
Try this API of "Files: list"
Files

Using a Content ID Contextual Filter in a Views Block in Drupal 8

I am attempting to create a View that, instead of showing a list of all nodes of a content type, will show only a single node of a content type based on node ID. In Drupal 7, I worked almost exclusively in Views Content Panes and was able to achieve this based on NID and then setting the Argument Input to From Context: Content ID. How do I get similar results using Blocks in Drupal 8?
I have a view that is correctly configured to show all nodes of a content type. I've tried to add a Contextual Filter: ID; but I cannot figure out how to configure it to get a result that isn't All Results.
Thank you in advance!
When you edit the contextual filter Content ID, you have :
WHEN THE FILTER VALUE IS NOT AVAILABLE (base view is built without filter, this is the case)
Check Provide default value to set how filter values should be retrieved, then you can choose a type, for example Content ID from URL, or Query parameter, etc.
For example with Query parameter you can set the parameter name and the Fallback value. In your case you would set something like nid as the query param, and all or a fixed node ID as fallback value ('all' is the exception value by default that is to disable the filter).
Given this example, you 'd just add the query ?nid=5 to the request path. It seems you need the block filtered by default though, in this case just set a fixed node ID (eg. 5 instead of all) as fallback value in views admin, then the block will be filtered by default the same way.

Create URL on string fields in kibana using two filters , the value of the field and the timestamp

I am looking to create URL on string field called "session name" in kibana interface to be redirected to an other search.
In my URL I need to use two queries, one based on the field value, for that I used '{{value}}' and the second one using the #timestamp value.
I have bieng trying "{{rawValue:#timestamp}}" but in vain.
My goal is two link two searchs based one the fields "session name" and the timestamp.
Any one can help?

What's the Parse "Object" column type for?

I see a column type of "Object" when I tried to add a new column to a class in the Parse data browser. What is it for and when do I use that?
This is a object similar to what you would refer to as type "id" when using variables in Objective-C. It is simply another type of variable that Parse is capable of storing. The type definition is given in this article under the heading "Objective-C Primitives"

is RestKit has default mapping if omit some field

my json and object both contain some fields with same name, and my mapping like this:
[mapping addAttributeMappingsFromArray :#[ #"postId", #"fieldname1", #"fieldname2", #"fieldname3", #"fieldname4", #"fieldname5"]];
if json was returned without fieldname4, it is fine, the mapping just ignore it.
but on the contrary, if I forget some field in mapping, for example.
[mapping addAttributeMappingsFromArray :#[ #"postId"]];
then the object will got nothing except postId even if json contains every field.
is there someway I can tell the mapping to do some "default mapping" if json and object contained same field name. So I need not list all the field names to the mapping even if their field names are all same.
No. You explicitly list the keys which should be processed.
You could create a dynamic mapping which introspects on the response and the destination object and creates a mapping including all keys. RestKit doesn't do that because it's slow...

Resources