npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@fnet/vast-sample

v0.1.4

Published

This project, `@fnet/vast-sample`, is designed to provide sample VAST (Video Ad Serving Template) URLs for testing video ad integrations. It helps developers and testers access pre-configured ad samples to verify video ad implementations within their appl

Downloads

3

Readme

@fnet/vast-sample

This project, @fnet/vast-sample, is designed to provide sample VAST (Video Ad Serving Template) URLs for testing video ad integrations. It helps developers and testers access pre-configured ad samples to verify video ad implementations within their applications, making the process more efficient and straightforward.

How It Works

The project initializes with default sets of VAST URLs categorized by templates such as 'ima', 'vmap', and 'simid'. Each category contains multiple ad sample URLs. Upon request, it randomly selects and returns one URL from the designated category, allowing users to retrieve VAST ad samples for testing purposes.

Key Features

  • Pre-configured VAST URLs: Provides a selection of predefined VAST URLs for various ad scenarios.
  • Template-based organization: Categorizes URLs under different templates like 'ima', 'vmap', and 'simid' for easy access.
  • Random selection: Selects URLs randomly within a template category to simulate different ad serving scenarios.

Conclusion

@fnet/vast-sample is a practical tool for developers and testers working with video ad functionalities. By offering easy access to sample VAST URLs, it simplifies the process of ad implementation testing, ensuring that video ads function correctly within applications.

@fnet/vast-sample Developer Guide

Overview

The @fnet/vast-sample library provides developers with a straightforward way to fetch VAST (Video Ad Serving Template) and VMAP (Video Multiple Ad Playlist) ad samples. The core functionality of this library is to supply a variety of ad templates that can be used for testing video and multimedia applications. Through its public API, developers can easily access different types of ad samples by specifying templates.

Installation

To use the @fnet/vast-sample library in your project, you can install it using npm or yarn. Open your terminal and run one of the following commands:

Using npm:

npm install @fnet/vast-sample

Using yarn:

yarn add @fnet/vast-sample

Usage

After installation, you can import the library and use its functionality to retrieve ad samples. The primary method provided by this library is getVAST, which allows you to obtain a random ad sample URL from a specified template type. Here is how you can use it in your code:

import vastSample from '@fnet/vast-sample';

(async () => {
    try {
        const ad = await vastSample.getVAST({ template: 'ima' });
        console.log(ad.value);
    } catch (error) {
        console.error('Error fetching ad sample:', error);
    }
})();

Examples

Fetching an IMA Ad Sample

import vastSample from '@fnet/vast-sample';

(async () => {
    const ad = await vastSample.getVAST({ template: 'ima' });
    console.log('IMA Ad URL:', ad.value);
})();

Fetching a VMAP Ad Sample

import vastSample from '@fnet/vast-sample';

(async () => {
    const ad = await vastSample.getVAST({ template: 'vmap' });
    console.log('VMAP Ad URL:', ad.value);
})();

Fetching a SIMID Ad Sample

import vastSample from '@fnet/vast-sample';

(async () => {
    const ad = await vastSample.getVAST({ template: 'simid' });
    console.log('SIMID Ad URL:', ad.value);
})();

These examples show how you can access different types of ad samples using the getVAST function of the @fnet/vast-sample library. Simply specify the desired template type, and the function returns an ad sample URL for use in your applications.

Acknowledgement

This library utilizes sample ad URLs provided by Google DoubleClick. We acknowledge Google's contribution in providing these resources for testing and development purposes.

Input Schema

$schema: https://json-schema.org/draft/2020-12/schema
type: object
properties:
  template:
    type: string
    description: Specifies the template type to be used, defaulting to 'ima'.
required: []