HTTP.get

Anywhere HTTP.get(url, [callOptions], [asyncCallback]) import { HTTP } from 'meteor/http' Source Send an HTTP GET request. Equivalent to calling HTTP.call with "GET" as the first argument. Arguments url String The URL to which the request should be sent. callOptions Object Options passed on to HTTP.call. asyncCallback Function Callback that is called when the request is completed. Required on the client.

HTTP.call

Anywhere HTTP.call(method, url, [options], [asyncCallback]) import { HTTP } from 'meteor/http' Source Perform an outbound HTTP request. Arguments method String The HTTP method to use, such as "GET", "POST", or "HEAD". url String The URL to retrieve. asyncCallback Function Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required. Options content String String to use as the HT

Field specifiers

Field Specifiers Queries can specify a particular set of fields to include or exclude from the result object. To exclude specific fields from the result objects, the field specifier is a dictionary whose keys are field names and whose values are 0. All unspecified fields are included. Users.find({}, {fields: {password: 0, hash: 0}}) To include only specific fields in the result documents, use 1 as the value. The _id field is still included in the result. Users.find({}, {fields: {firstname: 1

helpers

Client Template.myTemplate.helpers(helpers) import { Template } from 'meteor/templating' Source Specify template helpers available to this template. Arguments helpers Object Dictionary of helper functions by name.

events

Client Template.myTemplate.events(eventMap) import { Template } from 'meteor/templating' Source Specify event handlers for this template. Arguments eventMap Event Map Event handlers to associate with this template.

Event maps

Event Maps An event map is an object where the properties specify a set of events to handle, and the values are the handlers for those events. The property can be in one of several forms: eventtype Matches a particular type of event, such as 'click'. eventtype selector Matches a particular type of event, but only when it appears on an element that matches a certain CSS selector. event1, event2 To handle more than one type of event with the same function, use a comma-separated list. The hand

Email.send

Server Email.send(options) import { Email } from 'meteor/email' Source Send an email. Throws an Error on failure to contact mail server or if mail server returns an error. All fields should match RFC5322 specification. If the MAIL_URL environment variable is set, actually sends the email. Otherwise, prints the contents of the email to standard out. Note that this package is based on mailcomposer version 0.1.15, so make sure to refer to the documentation for that version if using the atta

EJSON.stringify

Anywhere EJSON.stringify(val, [options]) import { EJSON } from 'meteor/ejson' Source Serialize a value to a string. For EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as JSON.stringify. Arguments val EJSON-able Object A value to stringify. Options indent Boolean, Integer, or String Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when

EJSON.toJSONValue

Anywhere EJSON.toJSONValue(val) import { EJSON } from 'meteor/ejson' Source Serialize an EJSON-compatible value into its plain JSON representation. Arguments val EJSON-able Object A value to serialize to plain JSON.

EJSON.parse

Anywhere EJSON.parse(str) import { EJSON } from 'meteor/ejson' Source Parse a string into an EJSON value. Throws an error if the string is not valid EJSON. Arguments str String A string to parse into an EJSON value.