How do I send "#here" with the Slack API? - api

I know I can tag a user with <#U423DFDE|username> but I can't figure out how to tag #here

<!here> is the solution. There are other commands that work with the <!___> format.
Check out this part of the official Slack documentation for an overview about all such variables.

I use this:
var message= {
"text": "<!here> test text"
} ;

For channel use <#idchannel>, for username use <#memberIdName>
You can find it here:

Related

Shopware 6 Store-API set newsletter recipient tags

I'm trying to add a newsletter recipient through store-api, which works. But when I try to add a tag inside the request, it fails. The documentation states that it is possible to add a tag as a string to the request, see here
My request looks like the following:
POST /store-api/newsletter/subscribe
{"option":"subscribe","email":"email#email.com","storefrontUrl":"http://myhost.test","tags":"men"}
I also tried to make the tags value an array, but this doesn't work either...
So my question is: how do I add a tag to the newsletter recipient through the store api?
As of Version 6.4.3.0 this seems not possible.
I tried the same request as you, as well as
"tags":["men"]
and
"tags":["uuidOfExistingTagGoesHere"]
all does not work.
Also the doc block for tags is wrong (it says "zip code" instead of a useful description).
In addition I tried to assign existing tags - this is what works via the admin API:
"tags": [
{
"id": "80df380188364f3c9bbaaa4d6b993dbd"
},
{
"id": "108428f0a37c4d11a66976adc5337c23"
}
]
Which still returns
"code": "FRAMEWORK__WRITE_MALFORMED_INPUT",
"title": "Bad Request",
"detail": "Expected data to be array.",
Also looking at the code there currently seems no handling of the tags. As far as I understand it, the tags would needed to be created on the fly
A possible fix would be the following code:
if (isset($data['tags']) { // inserted that lines
$data['tags'] = $data['tags']->all();
} // end inserted lines
$data = $this->completeData($data, $context);
Using that line, the last mentioned request works (you could then use the IDs of existing newsletter recipient tags).
Of course in this case the API docs have to be adapted.
TL;DR
In my opinion, this seems a flaw in the current Store API implementation.
I would suggest to create an issue on the Shopware 6 issue tracker.

BigCommerce storefront apis for order

Where is the documentation for /api/storefront/orders/*?
I was expecting to find it on this page.
https://developer.bigcommerce.com/api-docs/cart-and-checkout/working-sf-apis
Specifically, the documentation that would cover /api/storefront/orders/:order-id
and cover the valid inputs to the querystring. I know you can pass include, with one or more of the values as a comma separated string
payments
lineItems.physicalItems.socialMedia
lineItems.physicalItems.options
lineItems.digitalItems.socialMedia
lineItems.digitalItems.options
Edit
The checkout stencil context object used on theme\templates\pages\order-confirmation.html has this schema
{
"order_confirmation_content": "goes in the body",
"checkout_head": "goes in the head",
"order": {
"id": 206
},
"header_image": "for an img src attribute"
}
The documentation for the storefront orders API can be found here:
https://developer.bigcommerce.com/api-reference/orders/storefront-orders-api/order/ordersbyorderidget
However, as you mentioned, there are a few query parameters that are undocumented. Those are not officially supported, and they might be subject to change in the future. This is a case where our position is to hold off on documenting the API parameters until we've determined long-term support. Hope that helps to provide some context!

How to set Embedded Data in qualtrics with Javascript

I can't seem to find the answer on how to set embedded data with javascript in Qualtrics.
Here is what I have:
Qualtrics.SurveyEngine.addOnload(function()
{
Qualtrics.SurveyEngine.setEmbeddedData( 'TimeStamp', "${date://CurrentTime/MS}" );
});
You need to add it to your survey flow.
Your syntax appears to be correct, so if you do this, you should be good to go!

neo4j v2.0.0-M3 REST API batch insert

I use batch insert for adding nodes using the RESY API I know how to do this before 2.0, but now I'm starting to use the labeled nodes, and I cant get it to work. I don't find how I can add the label to the node.
The documentation is not very clear (to me).
http://docs.neo4j.org/chunked/2.0.0-M03/rest-api-node-labels.html
This is the json that send to the API:
Test1:
[{"method":"POST",
"to":"/node",
"body":{"name":"A"},"id":0},
{"method":"POST",
"to":"{0}/labels",
"body":{"label":"user"}
}]
Test2:
[{"method":"POST",
"to":"/node",
"body":{"name":"A"},"id":0},
{"method":"POST",
"to":"/node/{0}/labels",
"body":{"label":"user"}
}]
Test3:
[{"method":"POST",
"to":"/node",
"body":{"name":"A"},"id":0},
"label":"user"
}]
thanks in advance
Steven
What is the error message you get?
Try this:
[{"method":"POST",
"to":"/node",
"body":{"name":"A"},"id":0},
{"method":"POST",
"to":"{0}/labels",
"body":"user"}
]
As you can see the body is only the label string.
I really appreciate the answer - but this is just to add that for me the labels did not appear in the body > Metadata > Labels section. For some reason this is not updated and it was only when I ran a match against that label that I found they were in fact correct. So if you run the answer - don't see labels listed in the output - they may still be present.

Trello API get card comments

is there a way to get all the comments of a card through the Trello API? I can get the card, the list which it is in, the members assigned to it etc. but can't see a way to get the comments.
Thanks.
Comments are a type of action ("commentCard"), so look into the /card/:id/actions
Try this API URL
Method: GET
https://api.trello.com/1/cards/{card_Id}/actions?filter=commentCard&key={trellokey}&token={trellotoken}
GET /1/cards/[card id or shortlink]/actions
you'll get list of action-objects in json, each has its type, type for comment "commentCard",
comment text in
object.data.text
https://trello.com/docs/api/card/index.html#get-1-cards-card-id-or-shortlink-actions
Trello.actions.get(action.id + "/data", function() {})
seems to do it for me with client.js. Hope that helps :)