I have an issue with contributors in gracenote:
Does someone know how much "date" and "place" fields types there might be ?
For now, i only saw something like TYPE="BIRTH". I suppose there might be something like "DEATH", i just want a confirmation please.
If someone knows about it, that would be great =).
TYPE="BIRTH" and TYPE="DEATH" are supported for contributor PLACE and DATE tags.
We will update the documentation to make sure both options are documented.
Related
We have certain type of fields that point to a reference that we want to resolve. Is there a way to search for these fields, however deep down the tree they are, and apply the "->" on it? We have prefixed these field with "msg_".
An example structure might look like this, but could also be buried deeper into another "children" array:
"children":[
0:{
"_key":"e0baca937bf2"
"_type":"hero"
"backgroundImage":{...}
"msg_subtitle":{
"_ref":"2459a16f-8d54-4f7a-8a57-31ad6a100d44"
"_type":"reference"
}
"msg_title":{
"_ref":"91cb61db-029b-4117-8872-154c190f4195"
"_type":"reference"
}
}]
So we want all the fields starting with "msg_" 's hard reference.
Thanks!
You can't recursively traverse references in GROQ yet.
Were you thinking about something like this? I'm not exactly sure what you mean by search.
That would indeed be handy to have a possibility like that. That said, in many of these cases we have been asked about this before, we have uncovered that it's fine to use the -> explicitly, and at the same time found content modeling problems.
The answer to this question is no, but feel free to reach out in the Community Slack: https://slack.sanity.io/. It may be that we can help you out some more there, and it's easier to have discussions there.
Super new to this sort of thing so please bear with me, I'm sure this is a facepalm-worthy question to anyone who knows anything about using APIs. I'm trying to use the CrowdTangle API (just got access) but their documentation isn't really helpful (at least to me). Even though it lists a bunch of parameters you can use, it doesn't give syntax examples so I'm not sure how to implement the parameters. For example, I tried to test a simple search for "dog" by doing https://api.crowdtangle.com/posts/search=dog?token=[my-token] and I got this error message:
{"status":400,"message":"Required String parameter 'searchTerm' is not present"}.
Does anyone know what the general syntax would be for this and how you use the parameters? I'm obviously looking to do more complicated searches than "dog", but I think if someone can just breakdown what the general syntax is I can probably manage from there.
Try:
https://api.crowdtangle.com/posts?token=your-api-token
just to get the ball rolling. Looks good? Then try:
https://api.crowdtangle.com/posts/search?token=MYTOKEN&searchTerm=waffles
And you should be good to go. You'll get a 401 if your token is valid but not good for that usage type.
I am struggling with the AtTask API. Specifically, I'm finding the documentation to be confusing and the examples to be very limited. For instance, the API supports "Named Queries" but there seems to be no listing or documentation of them. One point says that they are listed under "Actions" in the API Explorer, but I find very little there, and the named query that is used in the example "myWork" is not listed.
Can anyone point me to better documentation or examples? I can muddle through by trial and error, writing all my own queries, but it would be nice to know if there is already a Named Query that does what I need to do. For Instance, I need to get a list of assigned tasks. myWork returns a list of tasks that have already started, but I also need the work requests.
Any help will be greatly appreciated.
Thanks,
Mark
There is no question that the AtTask documentation is very weak and that undocumented features exist. Very frustrating. One thing that does help sometimes is to call the meta data for an object.
To view a tasks meta data go to cl02.attask-ondemand.com/attask/api/v4.0/task/metadata
Then just copy and paste the result on this page http://json.parser.online.fr/
It's not the best, but I found a few undocumented features that way.
Regarding getting a list of assigned tasks, I would consider just querying the tasks object with a user ID set as the search critera. Something like
cl02.attask-ondemand.com/attask/api/v4.0/task/search?method=get&assignedToID=5419c3e90001c026e1b72b7014e8e694
With beta4 and latest beta5 the DB-Feature-Implementation appears to have pretty much finished. There's a couple of tutorials out there how to handle a single Database using the TableGateway Pattern, but it appears there is none for handling M-N-Relationships.
In ZF1 we had findDependantRowset() on the TableGateway which was kind of dirty, as this simply was a second Query to the databse which pretty much isn't always neccessary.
In ZF2 i expected there to be a way to have good Joins mapping to specified models, but i can't find anything within the code. Maybe i'm blind, maybe there really isn't anything like this.
Has anyone of you managed to handle joins and models all together in ZF2? If so, please be so kind to instruct me how to do it, hint me to specific points of the documentation or link me some blogpost to one who has done it.
Thanks in advance guys!
The obvious solution if you need a generic solution is to use Doctrine ORM or Propel.
If you want to use Zend\Db, then within your concrete table gateway classes, you should write a specific method that retrieves the correct rows from the linked table. This way you can ensure that the SQL is optimised for the query that you need.
Everyone:
I've just recently finished implementing a "Soft Deleting" mechanism for my database driven web product using NHibernate. I followed the tutorial here for creating a SoftDeleteListener and it works like a charm, Kudos to the Gabriel Schenker who wrote that very good tutorial.
So, what's the problem? Well, I updated his code for the SoftDeleteListener I've implemented, and I tested it and all seems well. However, when I use a code template from a third party, I ALWAYS want to understand completely what every line of code is doing. In this case, however, I've searched and searched but I cannot find any documentation on the functions of the CascadeBeforeDelete and the CascadeAfterDelete methods! I can pretty much infer that they are doing some sort of foreign key cascading deletion functions, but the documentation on what exactly they are doing is nowhere to be found.
Can someone please point me to the proper documentation for these methods? Or, if none exists, could you kindly explain them to me?
Thanks in advance.
There's no documentation for those methods.
What you can do is get the NH sources and see how it's used in the code.
After Diego's suggestion, I've taken a quick look at the NHibernate sources for these files and, from the comment blocks in the source code, have determined their functions:
CascadeBeforeDelete - Cascades the delete call to all collections of that object before the object is deleted.
CascadeAfterDelete - Cascades the delete call to all many-to-one relationships to the object after the parent has been deleted
This was just taken from the comment directly, and I really don't have the time to thoroughly investigate these methods functions (tight deadlines keep me awake at night). If anyone has any more information on these methods they would like to share it would be greatly appreciated. Thanks.