
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
This is the Node.js interface for the Boxfish Platform API.
Install via npm.
$ npm install boxfish
npm run doc
)Require the API in your program.
var Boxfish = require("boxfish");
Boxfish.authorize("cake", "candle").then(function() {
return Boxfish.channels.getServices();
}).then(function(services) {
console.log("Services!")
}).catch(function(err) {
console.log("Oh no, error!");
});
One of the main features of the Boxfish API is ease of use so try using the API in the REPL. It adds several helper functions to make testing a real treat.
$ node
> var Boxfish = require("boxfish");
Welcome to the Boxfish API.
Each API function has it's own .help() function. For a list
of functions, use Boxfish.doc(). To run an example API call
on a method, do Boxfish.<method>.example() and it will run an
example if possible.
Helpers:
Boxfish.doc(); // Show a list of methods and their parameters
Boxfish.authorize.help(); // Show a methods parameters and description
Boxfish.channels.getServices.example(); // Run the method with example parameters
undefined
>
The API has the following namespaces:
channels
- Channels provides channel lists for provided ZIP codes, services and related content. See channels.
Boxfish.channels.getServices( :zipcode ) ✔
Boxfish.channels.createLineup( :service ) ✔
Boxfish.channels.getLineup( :lineupId ) ✔
Boxfish.channels.getRelatedContent( :channels, :channelType, :time ) ✔
Boxfish.channels.getThumbnails( :channels, :channelType, :time, :size ) ✔
Boxfish.channels.getDiscussions( :channels, :channelType, :lineupId, :time ) ✔
trending
- The trending discussions endpoint provides search results for currently trending topics.
Boxfish.trending.getTopics( :category ) ✔
Boxfish.trending.getDicussions( :category, :lineupId ) ✔
topics
- Get tags or entities for programs.
Boxfish.topics.getChannelTags( :channels, :channelType, :startTime, :endTime ) ✔
Boxfish.topics.getChannelTagsLatest( :channels, :channelType, :date ) ✔
Boxfish.topics.getChannelEntities( :channels, :channelType, :startTime, :endTime ) ✔
Boxfish.topics.getChannelEntitiesLatest( :channels, :channelType, :date ) ✔
Boxfish.topics.getRelated( :topic ) ✔
search
- Search tags, programs, channels or all.
Boxfish.search.all( :query, :lineupId, :categories, :limit, :types ) ✔
Boxfish.search.mentions( :query, :lineupId, :categories ) ✔
Boxfish.search.programs( :query, :lineupId ) ✔
Boxfish.search.channels( :query, :lineupId ) ✔
metrics
- Metrics provides real time updated statistics for entity keywords or expressions, minute by minute, or aggregated by year, month, day or hour.
Boxfish.metrics.getMentions( :keywords, :start, :stop ) ✔
Boxfish.metrics.getChannels( :keywords, :channels, :channelType, :start, :stop ) ✔
Boxfish.metrics.getCount( :keywords, :channels, :channelType, :start, :stop ) ✔
Boxfish.metrics.getGraph( :keywords, :channels, :channelType, :start, :stop ) ✔
epg
- These epg endpoint provides access to program (TV show) EPG data.
Boxfish.epg.getSchedule( :channels, :channelType, :lineupId, :start, :stop, :category ) ✔
Boxfish.epg.getGuide( :lineupId, :start, :stop, :category ) ✔
alerts
- The alerts endpoint provides notification mechanisms for monitored events, such as program/show reminders or topics of interest being discussed.
Boxfish.alerts.add(:keywords, :lineupId, :callbackURL, :uuid)
Boxfish.alerts.list(:uuid)
Boxfish.alerts.remove(:uuid, :keywords)
Every API methods can be called in the following ways:
1. Using a callback.
Boxfish.channels.getServices(89083, function(err, data) {
if(err) console.log("Oh noes! Error!");
else console.log("Got dem services", data);
});
2. Using promises.
Boxfish.channels.getServices(89083).then(function(data) {
console.log("Got dem services", data);
}).catch(function(err) {
console.log("Oh noes! Error!");
});
3. Implicit arguments. So if we had an API function that required the following data; startTime
, endTime
, count
, we can implicitly pass those arguments in that order to the function. (Promises are supported here if callback is omitted!)
Boxfish.search.programs("obama", "231jk4hkj-the-cake-is-a-lie-123jdk", function(err, data) {
if(err) console.log("Oh noes! Error!");
else console.log("Your programs: ", data);
});
4. Explicit arguments. Instead of passing the arguments as a list, you can pass them in an object so order does not matter.
Boxfish.search.programs({
lineupId: "231jk4hkj-the-cake-is-a-lie-123jdk",
query: "obama"
}, function(err, data) {
if(err) console.log("Oh noes! Error!");
else console.log("Your programs: ", data);
});
5. Using a callback, but getting request stream. WARNING: This method does not handle any errors in the request. That's up to you.
Boxfish.search.programs("obama", "231jk4hkj-the-cake-is-a-lie-123jdk", function(request) {
request.pipe(fs.createWriteStream("./my-programs.json"));
});
The library is compatible with Browserify. To use standalone Boxfish
in the browser, run npm build
and include build/boxfish.min.js
. To run browser tests, open test/browser/runner.html
.
Boxfish.authorize( :id, :secret )
Authorizes with Boxfish API with your credentials.
Boxfish.channels.getServices( :zipcode )
Gets the available television service providers for the provided ZIP code region.
Boxfish.channels.createLineup( :serviceId )
Generates a channel lineup id for the provided service, accessible using the channel lineup id.
Boxfish.channels.getLineup( :lineupId [, :hd] )
Gets the channels for a provided lineup id.
Boxfish.channels.getThumbnails( :channels [, :channelType] [, :time] [, :size] )
Get live thumbnails for channels.
Boxfish.channels.getDiscussions( :channels [, :channelType], :lineupId [, :time] )
Gets the discussions on a channel(s).
Boxfish.trending.getTopics( :category [, :limit] )
Gets the available television service providers for the provided ZIP code region.
Boxfish.trending.getDiscussions( :category, :lineupId [, :airing] )
Gets trending discussions: the latest conversations discussing currently trending topics on live TV. Provides a realtime "What's Hot" view of TV. Trending is based on what TV is speaking about, rather than Twitter or Viewer beheviour.
Boxfish.search.all( :query, :lineupId, :category [, :limit] [, :types] )
Search for channels, programs or mentions.
Boxfish.search.mentions( :query, :lineupId, :category [, :limit] )
Search for keywords or phrase mentions, globally or by category (e.g. "news", "sports" or "lifestyle"), based on what is being discussed on live TV. Results are filtered so that only one (the latest) result is returned for any individual program. Search only supports single keyword queries.
Boxfish.search.programs( :query, :lineupId [, :limit] )
Search for programs.
Boxfish.search.channels( :query, :lineupId [, :limit] )
Search for Channels.
Boxfish.metrics.getMentions( :keywords [, :start] [, :stop] [, :granularity] )
Gets granular mention counts and times of a keyword.
Boxfish.metrics.getChannels( :keywords, :channels [, :channelType] [, :start] [, :stop] )
Gets minute by minute mention counts for a keywords on specific channel(s).
Boxfish.metrics.getCount( :keywords, :channels [, :channelType] [, :start] [, :stop] )
Get total mention count metrics for keywords on specific channel(s).
Boxfish.metrics.getGraph( :keywords, :channels [, :channelType] [, :start] [, :stop] )
Get metrics array with a datapoints parameter to generate a graph.
Boxfish.epg.getSchedule( :channels [, :channelType], :lineupId [, :start] [, :stop], :category [, :upcoming] )
Gets the EPG/program schedule for provided channel(s)
Boxfish.epg.getGuide( :lineupId [, :start] [, :stop], :category [, :upcoming] )
Gets the EPG/program schedule for the provided lineup
Boxfish.topics.getChannelTagsLatest( :channels [, :channelType] [, :time] [, :limit] )
Gets tags for a specified channel(s).
Boxfish.topics.getChannelTags( :channels [, :channelType] [, :start] [, :stop] [, :limit] )
Gets tags for a specified channel(s) with a start and stop.
Boxfish.topics.getProgramTags( :channels [, :channelType] [, :time] [, :limit] )
Gets tags for a specified program and channel(s)
Boxfish.topics.getChannelEntitiesLatest( :channels [, :channelType] [, :time] [, :limit] )
Gets the most recent entities for a specified channel. Entities are nested one level deep.
Boxfish.topics.getChannelEntities( :channels [, :channelType] [, :start] [, :stop] [, :limit] )
Gets entities for a specified channel for a specified length. Entities are nested one level deep.
The Boxfish object is an instance of EventEmitter
and emits the following events.
error:request
When an error in a request is encountered.
error:request:<status code>
When an error is encountered in a request, scoped by status code. e.g. error:request:500
is an internal Boxfish server error.
error:request:[client|redirection|server]
When a client, redirection or server error is encountered in a request.
FAQs
Boxfish's Node API interface.
The npm package boxfish receives a total of 0 weekly downloads. As such, boxfish popularity was classified as not popular.
We found that boxfish demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.