This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
class ItemRating extends HTMLElement { | |
createdCallback () { | |
this.insertAdjacentHTML('afterbegin', ` | |
<a data-rating="1">★</a> | |
<a data-rating="2">★</a> | |
<a data-rating="3">★</a> | |
<a data-rating="4">★</a> | |
<a data-rating="5">★</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Core::PaginationSerializer < ActiveModel::ArraySerializer | |
def initialize(object, options={}) | |
meta_key = options[:meta_key] || :meta | |
options[meta_key] ||= {} | |
pobject = options[:pagination_object] || object | |
options[meta_key][:pagination] = { | |
current_page: pobject.current_page, | |
next_page: pobject.next_page, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
tagName: 'th', | |
downArrow: '▼', | |
upArrow: '▲', | |
actions: { | |
sortBy(model, sortProperty, order) { | |
// Remove all selected classes from all the header links |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<errors> | |
<error> Can't be saved </error> | |
</errors> | |
<warnings> | |
<warning> Cannot send msg, queue does not exist</warning> | |
</warnings> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET http://live.bolideapp.com/q.xml | |
GET http://live.bolideapp.com/q/<q_name>.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST http://live.bolideapp.com/msg.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET http://live.bolideapp.com/<account>/<queue_name>/<valid_token> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- It uses prototype & the bolide.js found in the ruby plugin or at live.bolideapp.com --> | |
<script src="/javascripts/prototype.js?1267672430" type="text/javascript"></script> | |
<script src="http://live.bolideapp.com/js/bolide.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
// With session ID and Token | |
bolide = new Bolide.Client("bolide", "b79c55c143df93241981c49aa97329f6", "cdcdaeb0-11c6-012d-0145-404077aa86f5", { | |
onSuccess: function(response){ | |
print("Success", response); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Headers should be: | |
# | |
# X-Bol-Date: <Date of the request, format doesn't matter> | |
# X-Bol-Authentication: <MD5 Hash> | |
# Content-Type: application/xml | |
# | |
def headers | |
now = DateTime.now.to_s | |
{'X-Bol-Date'=>now, 'X-Bol-Authentication'=>auth_key(now), 'Content-Type'=>'application/xml'} | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<qs account="bolide_account"> | |
<q id="client_1"> | |
<msg_count>0</msg_count> | |
<token>30b397d0-11c5-012d-0143-404077aa86f5</token> | |
<expire_on>2010-03-14T18:32:37+00:00</expire_on> | |
</q> | |
<q id="client_2"> | |
<msg_count>3</msg_count> | |
<token>4b321ff0-11c5-012d-0143-404077aa86f5</token> | |
<expire_on>2010-03-14T19:32:37+00:00</expire_on> |
OlderNewer