Writing a generic plugin | ThingSpeak Plugins | Forum

Avatar

Please consider registering
Guest

Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

Register Lost password?
sp_Feed sp_TopicIcon
Writing a generic plugin
Avatar
Resseguie
New Member
Forum Posts: 2
sp_UserOfflineSmall Offline
1
July 16, 2014 - 3:19 pm
sp_Permalink sp_Print

I'm interested in writing a generic / reusable plugin for Thingspeak. But all the examples I've seen are hard coded to call the API with a specific channel ID (and API_KEY if required) to get the feed data. Is there a way for the plugin to get the "current" channel who's page it's installed on?

Avatar
lee

Forum Posts: 457
sp_UserOfflineSmall Offline
2
July 16, 2014 - 4:05 pm
sp_Permalink sp_Print

Hi,

I just wrote a simple plugin that should allow you to get the channel ID depending on the channel page it exists on: https://thingspeak.com/plugins/4482 . Just view-source, and you should see the JavaScript code that should help you out.

lee

Avatar
Resseguie
New Member
Forum Posts: 2
sp_UserOfflineSmall Offline
3
July 17, 2014 - 2:23 pm
sp_Permalink sp_Print

Makes sense, thanks. Any thoughts on private channels that would require an API key?

Avatar
lee

Forum Posts: 457
sp_UserOfflineSmall Offline
4
July 17, 2014 - 2:33 pm
sp_Permalink sp_Print

It's a little more complicated, but you could extract the API keys from a JSON list of your channels. Please see "List My Channels" under the documentation here: https://thingspeak.com/docs/channels#index .

lee

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online:
16 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 252

Vinod: 164

cstapels: 96

piajola: 75

vespapierre: 63

Adarsh_Murthy: 59

Newest Members:

winnieeq69

AutoCheernpen

Bostermet

engladNed

iivenul

olewaeayafaku

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

 

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Administrators: Hans, lee