UCWA - contactPresence resource is missing property 'activity' - skype-for-business

Via UCWA we are requesting the contactPresence of each of our contacts.
According to the API reference, the contactPresence resource should have an property 'activity' that contains:
The contact's current activity encoded in UTF-16 and in the locale
specified during application creation. The value of this string is
localized in the current application's culture provided the localized
string exists in the contact's publication. Otherwise, the value of
this string is one of the well known activity strings in which case
the application is responsible for the localization. The well known
ones are "in-a-meeting", "urgent-interruptions-only", "on-the-phone",
"in-a-conference", "off-work", and "presenting".
See: https://ucwa.skype.com/documentation/Resources-contactPresence
However, in our response:
$ curl -i 'https://lyncwebsvcX.XXX.com/ucwa/oauth/v1/applications/xxx/people/xxxxx/presence' --header "Authorization:Bearer cwt=AAEBHA....aFE"
Returns:
{"availability":"Offline","deviceType":"Unknown","lastActive":"\/Date(1480607186000)\/","_links":{"self":{"href":"/ucwa/oauth/v1/applications/...../presence"}},"rel":"contactPresence"}
None of the contacts has an activity-property in their contactPresence, regardless of their availability.
The server is a Lync 2013 server with cumulative updates installed (at least up to August 2016).
edit
It seems that there is no support for custom states in Lync 2013:
The presence statuses are pre-set in Skype for Business (Lync), which
means you can’t create a custom status, but you can give your contacts
more details about where you are or what you’re doing by adding a
personal note
See: https://support.office.com/en-us/article/Change-your-presence-status-in-Lync-ef8998cc-7801-4b62-81ba-9a2c1630f9e5
The personal note mentioned above, seems to be available as the contactNote resource and not related to the availability or activity from the contact.
This however doesn't explain what the activity resembled and whether it can be used with Lync 2013. That part of the question remains.

Related

REST API Resource Granularity

I wanted to get opinion on resource granularity. Say, I have a an domain entity called "magazines". But there are different types of magazines, including Sports, Nature, Automobiles, Computers and Aeroplanes, etc.
When I want to create a new "sports" magazine, should I be using construct such as:
PUT /magazines
PUT /sports-magazines
PUT /magazines/sports
When I want to get a specific sports magazine, should I be saying:
GET /magazines/{id}
GET /sports-magazines/{id}
GET /magazines/sports/{id}
If I want to get sports magazines for the year 2001, should I be using:
GET /magazines?type=sports&year=2001
GET /sports-magazines?year=2001
GET /magazines/sports?year=2001
And finally, if I want to return how many pages each type of magazine has for January 2001 publication, how would I do that? Do I need to create a new pages resource for that? Or make two independent requests or something else? First of these is listed below:
GET /magazines/pages?type1=sports&type2=nature&year=2001&month=01
GET /sports-magazines/pages?type=nature&year=2001&month=01
Given these scenarios how would you model your resources?
I have a an domain entity called "magazines". But there are different types of magazines, including Sports, Nature, Automobiles, Computers and Aeroplanes, etc.
Important thing to understand: resources aren't domain entities. Your resource model is a facade that sits in front of your domain model.
Notice, for example, that this resource (REST API Resource Granularity) describes not only your question, but also my answer.
PUT probably is NOT what you want for "create a new resource" unless the client is already in position to know what URI should be used for the new resource. The target URI of a PUT request is the same URI that we expect to use later to GET the data
PUT /magazines/{id}
GET /magazines/{id}
In the case where we don't expect the client to know what the URI is going to be... well, we don't have an HTTP method that means precisely that, so we fall back to using POST (see Fielding, 2009).
POST /magazines
201 Created
Location: /magazines/12345
Note that the machines don't care if the URI of the created resource(s) match the target URI of the POST request.
REST really doesn't care what spelling conventions you use for your resource identifiers (in much the same way that the machines don't care what spelling conventions you use for variable names).
GET /magazines?type=sports&year=2001
GET /sports-magazines?year=2001
GET /magazines/sports?year=2001
GET /magazines/sports/year=2001
GET /magazines/sports/2001
Those are all fine; there are trade-offs. Key value pairs encoded into a query string make creating URI with HTML forms easier, using path segments makes relative resolution easier.
I want to return how many pages each type of magazine has for January 2001 publication
Creating a new URI with that information is fine. Extending the schema of your existing resources to include that information is also fine.

Missing MailHeader fields when accessing IUploadMailData in custom UploadOperationHandler (harmon.ie outlook plugin)

I am trying to access the "To"-Field in the mail header while hooking into the UploadOperation of an email item in the Harmon.ie Outlook addin (to rename the file using some defaults when uploading to sharepoint).
For some reason the only header fields I get from the uploaded item are Received, Date and From.
What I currently do is iterating the IUploadItemData elements in the IWrappedList inside the onBeforeUpload handler.
Then checking for items of type IUploadMailItemData and trying to access their MetaDataValue fields using the Harmonie.SDK.MailHeader class constants as keys. But as already mentioned I only get the 3 fields Received, Date and From.
What am I doing wrong? May I load the other header fields somehow too?
Are you customer?
I am asking because our SDK is only accessible from the Enterprise edition (not the free edition, our forum is for users running the free edition).
If you are customer, please disclose the name of your company and send a support request to support#harmon.ie
----- Jean

API key for themoviedb.org

I need to use themoviedb.org for one of the apps I am working on. For using the API, I need an API key. How do I get an API key on themoviedb.org?
I found this in the forum:
You can request an API key by clicking on the "API" link from within your account page on the left hand sidebar. See here
In terms of making things faster for people, the URL for application is here these days (Under Account>Settings>API as previously mentioned): https://www.themoviedb.org/settings/api
You'll want to start with a Developer key as wait time for a Developer key is zero (immediate). A commercial key, as far as I understand it, is only appropriate once the app is developed and running. Turnaround for a commercial API key is about 3 days-ish though obviously could vary.
Once you have a key, inside the doco pages there's a "Try It Out" tab which lets you do calls. The normal code flow (for getting movie details) would be something like:
Get Configuration (needed for image paths, should be cached)
Search Movies (returns a list, find the numeric id for the one you want in the list returned). Be aware there might be duplicates returned - you can use the year of release, title and language to find the one you want.
Get Movie Details with the movie numeric ID, with "append_to_response" of "credits,images,trailers" so that actors, writers, directors, and trailers (aka videos) are returned.
Check doco for how to find the actual image paths, using configuration values fetched above. It's generally considered courteous to copy the images you want to use to your own server rather than serving them from TMDB's server.

Clickbank - Create products for testing (in Sandbox)

I am new to Clickbank.
I want to try out the API for the same.
But I am stuck in between.
Can anyone guide me through the steps to successfully create a product.
I am getting some errors
You must make a test purchase before submiting this request.
A footer disclaimer is required for all Pitch and Thank You pages.
Also wanted to know, like how can I setup the sandbox account?
Please help me out.
Thanks in advance.
This question was asked a very long time ago but I just happened across it and know the answers.
First, however I think anyone starting on ClickBank, technical or otherwise, will benefit from the following: https://www.clickbank.com/launch-checklist/
Now, to answer the question(s):
Test Purchase:
• Can't do this without creating a product first
• To create a product you do the following:
Login to the account
Click: Vendor Settings -> My Products
On this page locate the list of ADD NEW buttons & Click Product
The product editor pretty well walks you through the process
AND now for the test purchase.
That process is described here: https://support.clickbank.com/hc/en-us/articles/360036958431-How-do-I-test-a-payment-link-
Footer/disclaimer:
This is what is known as the ClickBank Trust Badge currently, (not sure about 9years ago).
It's a little element that you copy and paste into your webpage, after configuring what you want it to look like & where you want it to be, from the available options.
To find and set it up:
Login to the account
Click Vendor Settings -> My Site
Scroll down to the section with the title "ClickBank Trust Badge - Injection Code"
If you like the default setup you can copy what's in the Javascript Snippet field
If you want to change where it's located and colors click the Configure Settings button (not going to describe everything here as it's pretty straight forward as well)
ClickBank APIs
Last, you mentioned wanting to use the ClickBank API, which I happen to know very well. However, the documentation for it is also actually pretty good so let me start off with that:
General ClickBank API documentation
Additionally each APIs primary endpoint is self documenting. Additionally this documentation tends to be the most relevant for a programmer
Example of self documenting endpoint: https://api.clickbank.com/rest/1.3/orders2
So, it's worth noting the following that are required to use the API:
You must have an HTTP header of "Authorization" and it must be set to both of the API keys for an account.
Both keys refers to the API- "Clerk Key" as well as the DEV- "Developer Key"
Enter them both, separated by a colon ":" as the value of the Authorization key with the DEV- key first (DEV-A23478C...:API-IA23456...)
You must also use the correct HTTP request type for the query you are wanting to make (the only two that are utilized are GET and POST)
Examples:(NOTE: ACCOUNT_NAME_HERE is the ClickBank "nickname" or account name)
Single transaction: https://api.clickbank.com/rest/1.3/orders2/RECEIPT_NUMBER_HERE
List transactions by date range and specific account: https://api.clickbank.com/rest/1.3/orders2/list?vendor=ACCOUNTNAME_HERE&startDate=2021-12-11&endDate=2021-12-14
Count of transactions by date range: https://api.clickbank.com/rest/1.3/orders2/count/?vendor=ACCOUNT_NAME_HERE&startDate=2022-01-01&endDate=2022-01-01
Monetary value of transactions by date range: https://api.clickbank.com/rest/1.3/quickstats/count/?account=ACCOUNT_NAME_HERE&startDate=2022-02-01&endDate=2022-02-10
Sending shipping data for physical products (POST): https://api.clickbank.com/rest/1.3/shipping2/shipnotice/4NVXUFNW?item=2&date=2018-08-14&carrier=UPS&tracking=1NH323452345WODFS&comments=Test%20again%20comment%20with%20spaces10%20receipt=4NVXUFNW

Bloomberg API: How to get the list of Pricing Sources?

It's possible to get current pricing source for a security (PRICING_SOURCE field). Is there any field that returns the list of all available pricing sources for defined security?
Thank you.
No - it's not currently possible.
Any fields (i.e. visible in FLDS in the terminal) are accessible via the API - such as the PRICING_SOURCE field in the question.
However, there is currently no functionality like the terminal commands PCS or ALLQ in the API at the moment. There is a request for this functionality with the Bloomberg programmers, and you can contact the Bbg helpdesk to have yourself added to the request to be informed when it becomes available.
Look up your pcs enablements, find the one you want to use /then lock down the eid # from the respective ctrb page. You can request eid specific prices via api.