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

ape-blog

v1.0.2

Published

Ape-blog is an AngularJS blogging module.

Downloads

5

Readme

Ape-Blog

Ape-blog is an AngularJS blogging module. Ape-Blog

Index

  1. Install
  2. Requirements
  3. Getting started
  4. Documentation
  5. Models

Requirements

  1. Orkiv Sapphire account.Login

Install

Via bower

bower install ape-blog

Via npm

npm install ape-blog

Or download the package directly here

Insert these tags after your angularjs tag :

<script type="text/javascript" src="bower_components/ape-js/ape.js"></script>
<script type="text/javascript" src="bower_components/ape-blog/ape-blog.js"></script>
/*
OR
*/
<script type="text/javascript" src="/ape-js/ape.js"></script>
<script type="text/javascript" src="/ape-blog/ape-blog.js"></script>
/*
OR
*/
<script type="text/javascript" src="node_modules/ape-js/ape.js"></script>
<script type="text/javascript" src="node_modules/ape-blog/ape-blog.js"></script>

** This module requires a sapphire account. Learn more about sapphire here.

Getting Started

Below is an example on initializing Ape-Blog

     var myApp = angular.module('myApp', ['ApeBlog',"ngSanitize"]);
  myApp.controller('Cntrl', function ($scope, ApeBlog) {

ApeBlog.Init(SAPPHIRE_ACCOUNT_ID);
//Fetch groups
ApeBlog.Groups( function(Data){
  console.log(Data);
});
... 
});

Documentation

Factory functions

Init - function (account String)

Initialize service. This function must be executed prior to any request.

account - Sapphire account ID.

SetStart - function (start function() )

Set function to be executed prior to each request.

start - function to be executed prior to each request.

SetEnd - function (end function(response response , http_response angular-http-response ) )

Set function to be executed after each request.

end - function to be ran after each request.

Groups - function (callback function(groups array[Group] ) )

List blog groups from Sapphire account.

callback - function ran once data is retrieved from Sapphire. On error the value passed, group, is set to false.

Blogs - function(query Query, callback function(blogs Query response ) )

List blogs from Sapphire.

query - Object used to filter data retrieved from Sapphire. callback - function ran once data is retrieved form Sapphire. On error the value passed, blogs, is set to false.

OpenBlog - function(id String, callback function(blog Blog) )

Open a blog via id.

id - ID of the Blog to open.

callback - function ran once data is retrieved form Sapphire. On error the value passed, blog, is set to false.

CreateQuery - function()

Create an empty Query object.

Return : Query

Empty query object.

MediaUrl - function(id String)

Create a URL to a media resource within your sapphire account.

id - ID of the desired file to load.

Return : string

URL to media resource.

Models

Query response

The object returned upon execution of function blogs()

Properties

pages - int

Length of blog pages. ** Starting with 1.

result - array[ blog ]

Results of query.

Query

The object used to search and paginate through blogs.

Properties

search - string

Title of blog to search for.

group - string

Blog group ID of cursor, use trending to get trending topics. Separate multiple group id by commma

page - int

Blog page index.

Response

Raw response of API request. This varies with the data your endpoint is sending. ** On API error the value of this model will always be false .