> Brickset API wordpress plugin resources analysis

Brickset API wordpress plugin resources analysis

Download This Plugin
Download Elegant Themes
Name Brickset API
Version 1.4.1
Author Nate Jacobs
Rating 0
Last updated 2014-12-26 12:30:00
Downloads
447
Download Plugins Speed Test plugin for Wordpress

Home page

Delta: 0%

Post page

Delta: 0%
Brickset API plugin has no negative impact on PageSpeed score.

Home page PageSpeed score has been degraded by 0%, while Post page PageSpeed score has been degraded by 0%

Brickset API plugin added 5 bytes of resources to the Home page and 14 bytes of resources to the sample Post page.

Brickset API plugin added 0 new host(s) to the Home page and 0 new host(s) to the sample Post page.

Great! Brickset API plugin ads no tables to your Wordpress blog database.

This plugin is an implementation of the Brickset Webservice. It includes methods to get LEGO® set and theme data from Brickset as well as pre-formated methods to display set data. The set data requested is cached daily to reduce HTTP requests and page load time. Please visit Brickset for more information on the webservice. You can obtain an API key from Brickset.

The main development is all happening on GitHub.

This is not an official Brickset.com plugin. LEGO® is a trademark of the LEGO Group of companies which does not sponsor, authorize or endorse this plugin.

Oembed

You can paste a Brickset set or theme url into your post or page. Once you publish the post or page information about the set or theme will be displayed. Two example URLs are below.

Template Tags

The plugin has numerous template tags you are able to use in your theme. They are listed below with a short description.

  • brickset_themes(); outputs a list of all themes.
  • brickset_subthemes( $theme ); outputs a table of all subthemes of the theme specified, the number of sets, and years available.
  • brickset_theme_years( $theme ); outputs a table of all the years the specified theme was available and the number of sets each year.
  • brickset_popular_searches(); outputs a list of the most popular search terms on Brickset.com.
  • brickset_updated_since( $date ); outputs a table of the sets updated since the date specified. The table includes thumbnail, set name and set number.
  • brickset_set_number( $set ); outputs a list of details about the sets specified. More than one set can be requested by separating the set numbers with a comma, e.g. '1380,10240'.

Shortcode

The plugin has a shortcode you may use in your posts and pages to display information about a set or sets.

  • [bs_set number='XXX'] outputs information about a specific set. Thumbnail, set name, set number, pieces, theme, subtheme and year. You can display multiple sets by seperating the set numbers with a comma.

Widgets

The plugin has four widgets you can activate in your theme. The first displays a list of all themes on Brickset with a link to browse each theme on Brickset.com and the second to display the details about a specific set. The third allows you to show off the total count of your minifigs. The last widget displays a count of sets produced in each year for a given theme.

Advanced Use

This example shows how to get the data about a specific set. You can find the developer docs here.

  1. Instantiate the class.
$brickset = new BricksetAPISearch();
  1. Pass a set number to the get_by_number method.
$set_data = $brickset->get_by_number( '8014' );
  1. Test for an error
if( is_wp_error( $set_data ) {
    echo $set_data->get_error_message;
}
  1. Display the results how you like. This will display the set's theme.
else {
    echo $set_data->theme;
}

Screenshots

Resources added by plugin to Home page/Post page in kB
Total size of resources for Home page/Post page in kB
Random Theme Tests
The Go Green Theme screenshot

The Go Green Theme

by: wavelength

56602
0%
Hueman screenshot

Hueman

by: AlxMedia

416082
98%