Coder Social home page Coder Social logo

cablecast-api-examples's People

Contributors

klaser avatar raytiley avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cablecast-api-examples's Issues

Resource cannot be found

I'm working on an integration to manually start and stop live events in cablecast via a Crestron control system. I'm trying to use the forceevents api. Whenever I do a post to that endpoint, I get the response below. I've got the media type header set to text/json. I'm also pretty sure I have the auth set up properly because I'm able to to do get requests for devices and outputs.

The json i'm sending is:
{
"forceEvents": [
"switchEvent": {
"device": 4,
"output": 1
}
]
}

And the response is:

Server Error in '/CablecastAPI' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /cablecastapi/v1/forceevents

Custom Results for shows

I want to create a page on our website for each and every show we produce. Currently, this is and example of what we have...

http://campbellmedia.org/node/5

This is our page for our government channel. If you go to this page, it gives you links to a page for each and every government show we shoot.

When you click on a show, it takes you to a new page that has a list of each and every episode. They're just listed as text links.

Every time we have a new meeting, i have to go to the website and duplicate one of those links, then change it so it matches up with the new meeting and is labeled correctly.

I want to try and automate this better. I want to be able to use the new API for the public VOD page and create it so that i can create a page for, say for example, Alexandria City Council, and have it display thumbnails of each and every new show from that program. I know that I would need to create a saved search that would give me all shows from project Alexandria City Council that have VOD files with them and displayed in descending order.

I just do not know how to apply this or mess with the API coding

Basic HTTP Authentication Example?

I'm currently working on adding some cool Cablecast integrations features into our new website and I'm having trouble understanding how to send the Authentication header with my request. I'd appreciate it if I can just get a super quick example of sending that header and then carrying out an innocent action like perhaps "POST v1/digitalfiles/{id}/reindex" since any valid file will just get reindexed and be valid again.

Once that's out of the way, I'll be sure to merge my code here. We have some cool examples in the works. Thanks.

EDIT: I made a few new attempts using modified stuff from SO (let's not lie here) and reading the jQuery documentation. The code below (with username, pass, and IP obviously changed to correct values) gives me the following error:
"request header field is not allowed by access-control-allow-headers"

Ideas?

``var username = "plaintextUser";
var password = "plaintextPass";

function make_base_auth(user, password) {
var tok = user + ':' + password;
var hash = btoa(tok);
return "Basic " + hash;
}
$.ajax
({
method: "POST", //use for jquery above 1.9.0 else type: 'POST'
url: "http://xxx.xxx.xxx.xxx/cablecastapi/v1/digitalfiles/867/reindex",
dataType: 'json',
async: false,
beforeSend: function (xhr){
xhr.setRequestHeader('Authorization', make_base_auth(username, password));
},
success: function (){
alert('The file is being reindexed!');
}
});

console.log("Testing connection.");

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.