question

Upvotes
Accepted
1 0 0 3

Has anyone used calais tagging in R?

h = c("X-AG-Access-Token" = key , "Content-Type" = "text/raw" , "outputformat" = "application/json; charset=utf-8") b<-list(body=upload_file("test.txt"))

POST(url=api ,add_headers(.headers=h) ,accept_json() ,encode = "multipart" ,body=text ,verbose())

I've been working with this code for a few days and would greatly appreciate any help!

intelligent-tagging-apiauthenticationrintelligent-taggingopen-calais-apisemantic-metadata-taggingtokenpost
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvotes
Accepted
21 0 0 0

Tag API doesn't support "multipart". I would start with something like this:

POST(url="<<url>>", add_headers(.headers=c("Content-Type"="text/raw", "X-AG-Access-Token"="<<key>>")), accept_json(), verbose(), body="<<some-text-to-tag>>")
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.