From 5143581658fc72d1dfa63aa3554bd37336d3748a Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 15 Oct 2012 10:09:37 -0700 Subject: [PATCH] Wrap long lines in api.html. --- docs/client/api.html | 87 ++++++++++++++++++++++++++------------------ 1 file changed, 52 insertions(+), 35 deletions(-) diff --git a/docs/client/api.html b/docs/client/api.html index e7ff80ae9b..faf6db0870 100644 --- a/docs/client/api.html +++ b/docs/client/api.html @@ -50,15 +50,15 @@ will publish that cursor's documents. return Rooms.find({}, {fields: {secretInfo: false}}); }); -Otherwise, the publish function can [`set`](#publish_set) and [`unset`](#publish_unset) -individual record attributes on a client. These methods are provided by -`this` in your publish function. +Otherwise, the publish function can [`set`](#publish_set) and +[`unset`](#publish_unset) individual record attributes on a client. These +methods are provided by `this` in your publish function. -In particular, if you use [`observe`](#observe) to watch changes to the database, be -sure to call `this.flush` from inside your observe callbacks. Methods -that update the database are considered finished when the `observe` +In particular, if you use [`observe`](#observe) to watch changes to the +database, be sure to call `this.flush` from inside your observe callbacks. +Methods that update the database are considered finished when the `observe` callbacks return. Example: @@ -236,9 +236,9 @@ connection that made this method call. This simply sets the value of `userId` for future method calls received on this connection. Pass `null` to log out the connection. -If you are using the built-in Meteor accounts system then this should correspond to -the `_id` field of a document in the -[`Meteor.users`](#meteor_users) collection. +If you are using the built-in Meteor accounts system then this should correspond +to the `_id` field of a document in the [`Meteor.users`](#meteor_users) +collection. `setUserId` is not retroactive. It affects the current method call and any future method calls on the connection. Any previous method calls on @@ -1137,7 +1137,9 @@ Otherwise, the HTML is unadorned and static. {{> api_box template_rendered}} -This callback is called once when an instance of Template.*myTemplate* is rendered into DOM nodes and put into the document for the first time, and again each time any part of the template is re-rendered. +This callback is called once when an instance of Template.*myTemplate* is +rendered into DOM nodes and put into the document for the first time, and again +each time any part of the template is re-rendered. In the body of the callback, `this` is a [template instance](#template_inst) object that is unique to this occurrence of @@ -1179,8 +1181,8 @@ See [Event Maps](#eventmaps) for a detailed description of the event map format and how event handling works in Meteor. {{#note}} -This syntax replaces the previous syntax: `Template.myTemplate.events = {...}`, but for now, the -old syntax still works. +This syntax replaces the previous syntax: `Template.myTemplate.events = {...}`, +but for now, the old syntax still works. {{/note}} @@ -1433,7 +1435,8 @@ an element that matches a certain CSS selector. {{/dtdd}} {{#dtdd "event1, event2"}} -To handle more than one type of event with the same function, use a comma-separated list. +To handle more than one type of event with the same function, use a +comma-separated list. {{/dtdd}} @@ -1690,8 +1693,8 @@ This collection contains one document per user. Example user document: } -Like all Meteor.Collections, you can access all documents on the -server, but only those specifically published by the server are +Like all Meteor.Collections, you can access all +documents on the server, but only those specifically published by the server are available on the client. By default, the current user's `username`, `emails` and `profile` are @@ -1703,13 +1706,19 @@ current user with: {fields: {'other': 1, 'things': 1}}); }); -If the `autopublish` package is installed, the `username` and `profile` fields for all users are published to all clients. To publish specific fields from all users: +If the `autopublish` package is installed, the `username` and `profile` fields +for all users are published to all clients. To publish specific fields from all +users: Meteor.publish("allUserData", function () { return Meteor.users.find({}, {fields: {'nested.things': 1}}); }); -Users are by default allowed to specify their own `profile` field with [`Accounts.createUser`](#accounts_createuser) and modify it with `Meteor.users.update`. To allow users to edit additional fields, use [`Meteor.users.allow`](#allow). To forbid users from making any modifications to their user document: +Users are by default allowed to specify their own `profile` field with +[`Accounts.createUser`](#accounts_createuser) and modify it with +`Meteor.users.update`. To allow users to edit additional fields, use +[`Meteor.users.allow`](#allow). To forbid users from making any modifications to +their user document: Meteor.users.deny({update: function () { return true; }}); @@ -1744,9 +1753,9 @@ with the provider, the pop-up window is closed and the Meteor client logs in to the Meteor server with the information provided by the OAuth provider. -If the user has not already granted all the permissions requested they -will be prompted to grant access to their account in the pop-up -dialog. Values for the `requestPermissions` parameter differ for each login service: +If the user has not already granted all the permissions requested they will be +prompted to grant access to their account in the pop-up dialog. Values for the +`requestPermissions` parameter differ for each login service: - Facebook: http://developers.facebook.com/docs/authentication/permissions/ - GitHub: http://developer.github.com/v3/oauth/#scopes @@ -1774,8 +1783,8 @@ and then call [`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail). This will send the user an email with a link to set their initial password. -By default the `profile` option is added directly to the new user -document. To override this behavior, use [`Accounts.onCreateUser`](#accounts_createuser). +By default the `profile` option is added directly to the new user document. To +override this behavior, use [`Accounts.onCreateUser`](#accounts_createuser). This function is only used for creating users with passwords. The OAuth login flows do not use this function. @@ -1817,21 +1826,24 @@ sets the `emails.verified` field in the user record. The token in this email should be passed to [`Accounts.resetPassword`](#accounts_resetpassword). -To customize the contents of the email, see [`Accounts.emailTemplates`](#accounts_emailtemplates). +To customize the contents of the email, see +[`Accounts.emailTemplates`](#accounts_emailtemplates). {{> api_box accounts_sendEnrollmentEmail}} The token in this email should be passed to [`Accounts.resetPassword`](#accounts_resetpassword). -To customize the contents of the email, see [`Accounts.emailTemplates`](#accounts_emailtemplates). +To customize the contents of the email, see +[`Accounts.emailTemplates`](#accounts_emailtemplates). {{> api_box accounts_sendVerificationEmail}} The token in this email should be passed to [`Accounts.verifyEmail`](#accounts_verifyemail). -To customize the contents of the email, see [`Accounts.emailTemplates`](#accounts_emailtemplates). +To customize the contents of the email, see +[`Accounts.emailTemplates`](#accounts_emailtemplates). {{> api_box accounts_emailTemplates}} @@ -1841,17 +1853,22 @@ for the emails by `sendResetPasswordEmail`, `sendEnrollmentEmail`, and Override fields of the object by assigning to them: -- `from`: A `String` with an RFC5322 From address. By default email is from `no-reply@meteor.com`. If you wish to receive email from users asking for help with their account, be sure to set this to an email address that you can receive email at. - -- `siteName`: The public name of your application. Defaults to the DNS name of the application (eg: `awesome.meteor.com`). - +- `from`: A `String` with an RFC5322 From address. By default email is from + `no-reply@meteor.com`. If you wish to receive email from users asking for help + with their account, be sure to set this to an email address that you can receive + email at. +- `siteName`: The public name of your application. Defaults to the DNS name of + the application (eg: `awesome.meteor.com`). - `resetPassword`: An `Object` with two fields: - - `resetPassword.subject`: A `Function` that takes a user object and returns a `String` for the subject line of a reset password email. - - `resetPassword.text`: A `Function` that takes a user object and a url, and returns the body text for a reset password email. - -- `enrollAccount`: Same as `resetPassword`, but for initial password setup for new accounts. - -- `verifyEmail`: Same as `resetPassword`, but for verifying the users email address. + - `resetPassword.subject`: A `Function` that takes a user object and returns + a `String` for the subject line of a reset password email. + - `resetPassword.text`: A `Function` that takes a user object and a url, and + returns the body text for a reset password email. +- `enrollAccount`: Same as `resetPassword`, but for initial password setup for + new accounts. +- `verifyEmail`: Same as `resetPassword`, but for verifying the users email + address. Example: