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

jquery-eclipsefdn-api

v0.0.46

Published

Fetch and display data from various Eclipse Foundation APIs.

Downloads

5

Readme

jquery-eclipsefdn-api Build Status

About

A jQuery plugin that fetches and display data from various Eclipse Foundation APIs.

Options

Here's a list of available settings.

$("div").eclipseFdnApi({
  username: "cguindon",
  type: "mpFavoritesCount"
});

Attribute | Type | Default | Description --- | --- | --- | --- apiUrl | String | https://api.eclipse.org | Eclipse Api URL. gerritUrl | String | https://git.eclipse.org/r | Eclipse Gerrit URL. eventUrl | String | https://events.eclipse.org/data/EclipseEvents.json | Eclipse event json feed URL. forumsUrl | String | https://www.eclipse.org/forums | Eclipse Forums URL. marketplaceUrl | String | https://marketplace.eclipse.org | Eclipse Marketplace URL. errorMsg | String | <i class=\"fa red fa-exclamation-triangle\" aria-hidden=\"true\"></i> An unexpected error has occurred. | Error message for when the ajax request fails. gerritUserNotFoundMsg | String | <i class=\"fa red fa-exclamation-triangle\" aria-hidden=\"true\"></i> An unexpected error has occurred. | Error message for when a user is not found on Gerrit. username | String | cguindon | The username to fetch Eclipse Favorites or Gerrit reviews for. currentUsername | String | `` | The user making the request this page. Useful if content changed if the user is viewing his own page. type | String | | Valid values are gerritReviews, gerritReviewsCount, mpFavorites, projectsList, forumsMsg and recentEvents. itemsPerPage | Integer | 20 | Number of fetched items to display per page.

Contributing

Check CONTRIBUTING.md for more information.

License

MIT License © Christopher Guindon

Thanks to https://github.com/jquery-boilerplate/jquery-boilerplate, MIT License © Zeno Rocha

jquery-eclipsefdn-igc README

About

A jQuery plugin to provide OAUTH2 Implicit Grant Flow authorization functionality for API requests to client scripts and plugins

Options

Here's an example of how to use the client.

// set delayed response handlers

// delayed request was completed after authorization, and these were the results
$(document).on("igcRequestComplete", function(event, eventData) {
  if (eventData.clientName === "myScript") {
    // returned result data will be stored in eventData.data
    // you can determine which request you made by checking eventData.requestOptions
  }
});

// delayed request failed
$(document).on("igcRequestFailed", function(event, eventError) {
  if (eventError.clientName === "myScript") {
    // request failed.  the details ajax response is stored in eventError.jqXHR
  }
});

// authorization failed (ie. authorization was denied or there was a validation failed)
$(document).on("igcAuthFailed", function(event, authError) {
  if (authError.clientName === "myScript") {
    // authError.error will show any status code, if available.
    // authError.error_description will contain a test description of what went wrong
    // authError.error_from will indicate which area in the processes the failure occured
  }
});

// initialize the client - any delayed responses will be triggered during initialization
$(document).eclipseFdnIgc({
  clientName: "myScript",
  authURL: "https://accounts.example.com",
  apiURL: "https://api.example.com",
  username: "darmstrong"
});

// make a request
requestOptions = {
  // api service end-point path
  path: "marketplace/favorites/12345",
  method: "PUT",
  cid: "myClientID",
  scope: "scopeToRequest",
  // callbacks are used for non-delayed responses (client already authorized) 
  // for immediate response without broadcasting to all clients
  successCallback: function(data) {
    // we can do something now and call a function script to process the data
  },
  errorCallback: function(jqXHR) {
    // the request failed.  status code and error message is in the jqXHR object
    // it is important to check the response to determine if this is a soft error (action already performed)
    // or if there is something wrong with the request that needs to be corrected before attempting again.
  }
};
// send the request to the eclipseFdnIgc plugin. If the client does not have an authorization token, or it has become expired,
// it will make a request for a new one.
$(document).eclipseFdnIgc.makeRequest(requestOptions);

Attribute | Type | Default | Description --- | --- | --- | --- clientName | String | unknown | Identifying name for client. Used to separate stored items. authUrl | String | https://accounts.eclipse.org | Eclipse Authorization base URL. apiUrl | String | https://api.eclipse.org | Eclipse API base url. redirectUri | String | [location.protocol, "//", location.host, "/site_login_implicit_grant"].join("") | redirect landing page for authorization response. defaults to current site and path of "/site_login_implicit_grant" baseStorageName | String | eclipseIGC | base name to build storage name from. redirectIfValid | Boolean | true | redirect to originating page after validating authorization response validateUser | Boolean | true | Validates authorization token matches currently logged in user useOpenWin | Boolean | false | Opens a new window for authorization flow instead of using current window. encodeStorage | Boolean | true | Base64 encode data placed in storage userName | String | '' | currently logged in username, used for validation purposes and to clear items if user logs out or other account is logged in completeOnAuthorization | Boolean | true | finish the request that triggered authorization after completing validation

License

MIT License © Christopher Guindon

Thanks to https://github.com/jquery-boilerplate/jquery-boilerplate, MIT License © Zeno Rocha