The typepad.api module contains TypePadObject implementations of all the content objects provided in the TypePad API.
An application that can authenticate to the TypePad API using OAuth.
An application is identified by its OAuth consumer key, which in the case of a hosted group is the same as the identifier for the group itself.
Returns an Application instance by the API key.
Asserts that the api_key parameter matches ^w+$.
An item of content generated by a user.
This asset’s author.
This alias lets us use Asset instances interchangeably with Event instances in templates.
A TypePadObject property representing a link from one TypePad API object to another.
This Link works like remoteobjects.fields.Link, but builds links using the TypePad API URL scheme. That is, a Link on /asset/1.json called events links to /asset/1/events.json.
A TypePadObject property representing a link from one TypePad API object to another.
This Link works like remoteobjects.fields.Link, but builds links using the TypePad API URL scheme. That is, a Link on /asset/1.json called events links to /asset/1/events.json.
Returns an Asset instance by the identifier for the asset.
Asserts that the url_id parameter matches ^w+$.
Returns an Asset instance by the url id for the asset.
Asserts that the url_id parameter matches ^w+$.
A field representing a homogeneous list of data.
The elements of the list are decoded through another field specified when the List is declared.
A property for encoding object attributes as dictionary values and decoding dictionary values into object attributes.
Declare a Field instance for each attribute of a DataObject that should be encoded to or decoded from a dictionary.
Use a Field instance directly for simple DataObject attributes that can be the same type as their dictionary values. That is, use Field fields for strings, numbers, and boolean values. If your attribute data does need converted, use one of the Field subclasses from the remoteobjects.fields module to encode and decode your data as appropriate.
If your attribute needs converted specially, override the decode() and encode() methods in a new subclass of Field. For example, the fields.Datetime subclass of Field encodes Python datetime.datetime instances in a dictionary as timestamp strings.
A property for encoding object attributes as dictionary values and decoding dictionary values into object attributes.
Declare a Field instance for each attribute of a DataObject that should be encoded to or decoded from a dictionary.
Use a Field instance directly for simple DataObject attributes that can be the same type as their dictionary values. That is, use Field fields for strings, numbers, and boolean values. If your attribute data does need converted, use one of the Field subclasses from the remoteobjects.fields module to encode and decode your data as appropriate.
If your attribute needs converted specially, override the decode() and encode() methods in a new subclass of Field. For example, the fields.Datetime subclass of Field encodes Python datetime.datetime instances in a dictionary as timestamp strings.
The title of the asset as provided by its author.
For some types of asset, the title may be an empty string. This indicates the asset has no title.
A structure that refers to an asset without including its full content.
Returns False.
This method prevents AssetRef instances from being reclassed when updated from a data dictionary based on the dictionary’s objectTypes member.
A URI that uniquely identifies the referenced Asset.
The URI matches the one in the referenced Asset instance’s id field.
An identifier for this Asset that can be used in URLs.
The identifier matches the one in the referenced Asset instance’s url_id.
An entry in a blog.
A link to an audio recording.
A user account on an external website.
A unique identifier for this elsewhere account.
Used when issuing a cross-post to the elsewhere account.
The username of the account, if known and appropriate.
Some services don’t have username attributes, only user_id attributes.
An action that a user or group did.
An event has an actor, which is the user or group that did the action; a set of verbs that describe what kind of action occured; and an object that is the object that the action was done to. In the current TypePad API implementation, only assets, users and groups can be the object of an event.
The entity (User or Group) that performed the described Event.
For example, if the Event represents someone joining a group, actor would be the User who joined the group.
The object (a User, Group, or Asset) that is the target of the described Event.
For example, if the Event represents someone joining a group, object would be the group the User joined.
A list of URIs describing what this Event describes.
For example, if the Event represents someone joining a group, verbs would contain the one URI tag:api.typepad.com,2009:JoinedGroup.
A favorite of some other asset.
Asserts that the user_id and asset_id parameter match ^w+$.
A group that users can join, and to which users can post assets.
TypePad API social applications are represented as groups.
A TypePadObject property representing a link from one TypePad API object to another.
This Link works like remoteobjects.fields.Link, but builds links using the TypePad API URL scheme. That is, a Link on /asset/1.json called events links to /asset/1/events.json.
A TypePadObject property representing a link from one TypePad API object to another.
This Link works like remoteobjects.fields.Link, but builds links using the TypePad API URL scheme. That is, a Link on /asset/1.json called events links to /asset/1/events.json.
A TypePadObject property representing a link from one TypePad API object to another.
This Link works like remoteobjects.fields.Link, but builds links using the TypePad API URL scheme. That is, a Link on /asset/1.json called events links to /asset/1/events.json.
The name chosen for the Group for display purposes.
Use this name when displaying the Group‘s name in link text or other text for human viewing.
A TypePadObject property representing a link from one TypePad API object to another.
This Link works like remoteobjects.fields.Link, but builds links using the TypePad API URL scheme. That is, a Link on /asset/1.json called events links to /asset/1/events.json.
Returns a Group instance by their unique identifier.
Asserts that the id parameter is valid.
Returns a Group instance by the group’s url identifier.
Asserts that the url_id parameter matches ^w+$.
A URI that uniquely identifies this Group.
A group’s id URI is unique across groups, TypePad environments, and time. When associating local content with a group, use this identifier as the “foreign key” to an API group.
A TypePadObject property representing a link from one TypePad API object to another.
This Link works like remoteobjects.fields.Link, but builds links using the TypePad API URL scheme. That is, a Link on /asset/1.json called events links to /asset/1/events.json.
A TypePadObject property representing a link from one TypePad API object to another.
This Link works like remoteobjects.fields.Link, but builds links using the TypePad API URL scheme. That is, a Link on /asset/1.json called events links to /asset/1/events.json.
A TypePadObject property representing a link from one TypePad API object to another.
This Link works like remoteobjects.fields.Link, but builds links using the TypePad API URL scheme. That is, a Link on /asset/1.json called events links to /asset/1/events.json.
A TypePadObject property representing a link from one TypePad API object to another.
This Link works like remoteobjects.fields.Link, but builds links using the TypePad API URL scheme. That is, a Link on /asset/1.json called events links to /asset/1/events.json.
An identifier for this Group that can be used in URLs.
A group’s url_id is unique in only one TypePad environment, so you should use id, not url_id, to associate data with a Group. When constructing URLs to API resources in a given TypePad environment, however, use url_id.
A field representing a homogeneous list of data.
The elements of the list are decoded through another field specified when the List is declared.
A TypePadObject property representing a link from one TypePad API object to another.
This Link works like remoteobjects.fields.Link, but builds links using the TypePad API URL scheme. That is, a Link on /asset/1.json called events links to /asset/1/events.json.
A link to an image.
Images hosted by TypePad can be resized with image sizing specs. See the url_template field and at_size method.
Returns the URL for the image at size given by spec.
You can request images from TypePad in several sizes, using an image sizing spec. For example, the image spec pi means the original size of the image, whereas 75si means a 75 pixel square.
If spec is not a valid image sizing spec, this method raises a ValueError.
Given a size, return an ImageLink of an image that is no taller than the requested size.
This mode scales the image such that the height is the size specified in the spec, and the width is scaled to maintain the image’s aspect ratio.
Given a size, return an ImageLink of an image that is no wider than the requested size.
This mode scales the image such that the width is the size specified in the spec, and the height is scaled to maintain the image’s aspect ratio.
Given a size, return an ImageLink of an image that is no taller or wider than the requested size.
This mode takes the largest dimension (either width or height) and scales the image so that dimension is the size specified in the spec. The other dimension is scaled to maintain the image’s aspect ratio.
Given a size, return an ImageLink of an image that fits within a square of the requested size.
This results in a square image whose width and height are both the size specified. If the original image isn’t square, the image is cropped across its longest dimension, showing only the central portion which fits inside the square.
If TypePad is able to scale the image, the URL template for making resized image URLs.
The URL template is combined with an image sizing spec to provide an URL to the same image at a different size.
Only images hosted on TypePad are available in multiple sizes. Images such as Facebook and Twitter userpics are only available in one size. If an image is not resizable, its url_template will be None.
A shared link to some URL.
A property for encoding object attributes as dictionary values and decoding dictionary values into object attributes.
Declare a Field instance for each attribute of a DataObject that should be encoded to or decoded from a dictionary.
Use a Field instance directly for simple DataObject attributes that can be the same type as their dictionary values. That is, use Field fields for strings, numbers, and boolean values. If your attribute data does need converted, use one of the Field subclasses from the remoteobjects.fields module to encode and decode your data as appropriate.
If your attribute needs converted specially, override the decode() and encode() methods in a new subclass of Field. For example, the fields.Datetime subclass of Field encodes Python datetime.datetime instances in a dictionary as timestamp strings.
An entry in a blog.
An external service that provided an asset.
A container for the flags that represent an asset’s publication status.
Publication status is currently represented by two flags: published and spam. The published flag is false when an asset is held for moderation, and can be set to true to publish the asset. The spam flag is true when TypePad’s spam filter has determined that an asset is spam, or when the asset has been marked as spam by a moderator.
The unidirectional relationship between a pair of entities.
A Relationship can be between a user and a user (a contact relationship), or a user and a group (a membership). In either case, the relationship’s status shows all the unidirectional relationships between the source and target entities.
A field representing a homogeneous mapping of data.
The elements of the mapping are decoded through another field specified when the Dict is declared.
A RelationshipStatus describing the types of relationship this Relationship instance represents.
Unlike the RelationshipStatus instance in the status field, this linked RelationshipsStatus instance can be updated through POST requests.
A representation of just the relationship types of a relationship, without the associated endpoints.
Information about an Asset instance imported from another service.
Whether the associated asset was created on the external service by the TypePad asset’s author, as opposed to imported by that TypePad user.
For example, a YouTube video asset that the TypePad user created would have a by_user of True. If the TypePad user instead posted someone else’s YouTube video, by_user would be False. (As far as TypePad is concerned, the TypePad user who posted it is the asset’s author in either case.)
A property for encoding object attributes as dictionary values and decoding dictionary values into object attributes.
Declare a Field instance for each attribute of a DataObject that should be encoded to or decoded from a dictionary.
Use a Field instance directly for simple DataObject attributes that can be the same type as their dictionary values. That is, use Field fields for strings, numbers, and boolean values. If your attribute data does need converted, use one of the Field subclasses from the remoteobjects.fields module to encode and decode your data as appropriate.
If your attribute needs converted specially, override the decode() and encode() methods in a new subclass of Field. For example, the fields.Datetime subclass of Field encodes Python datetime.datetime instances in a dictionary as timestamp strings.
A textual tag applied to an asset by its author.
The number of times the Tag has been used in the requested context.
When returned in the list of tags for a group, the count is the number of times the Tag has been used for assets in that group. When returned in the list of tags for a User, the count is the number of times the tag has been used on that author’s assets. When returned in the list of tags for an Asset, the count is 1 if the tag has been applied to that asset.
A TypePad user.
This includes those who own TypePad blogs, those who use TypePad Connect and registered commenters who have either created a TypePad account or signed in with OpenID.
A TypePadObject property representing a link from one TypePad API object to another.
This Link works like remoteobjects.fields.Link, but builds links using the TypePad API URL scheme. That is, a Link on /asset/1.json called events links to /asset/1/events.json.
The name chosen by the User for display purposes.
Use this name when displaying the User‘s name in link text or other text for human viewing.
A TypePadObject property representing a link from one TypePad API object to another.
This Link works like remoteobjects.fields.Link, but builds links using the TypePad API URL scheme. That is, a Link on /asset/1.json called events links to /asset/1/events.json.
A property for encoding object attributes as dictionary values and decoding dictionary values into object attributes.
Declare a Field instance for each attribute of a DataObject that should be encoded to or decoded from a dictionary.
Use a Field instance directly for simple DataObject attributes that can be the same type as their dictionary values. That is, use Field fields for strings, numbers, and boolean values. If your attribute data does need converted, use one of the Field subclasses from the remoteobjects.fields module to encode and decode your data as appropriate.
If your attribute needs converted specially, override the decode() and encode() methods in a new subclass of Field. For example, the fields.Datetime subclass of Field encodes Python datetime.datetime instances in a dictionary as timestamp strings.
A TypePadObject property representing a link from one TypePad API object to another.
This Link works like remoteobjects.fields.Link, but builds links using the TypePad API URL scheme. That is, a Link on /asset/1.json called events links to /asset/1/events.json.
A TypePadObject property representing a link from one TypePad API object to another.
This Link works like remoteobjects.fields.Link, but builds links using the TypePad API URL scheme. That is, a Link on /asset/1.json called events links to /asset/1/events.json.
A property for encoding object attributes as dictionary values and decoding dictionary values into object attributes.
Declare a Field instance for each attribute of a DataObject that should be encoded to or decoded from a dictionary.
Use a Field instance directly for simple DataObject attributes that can be the same type as their dictionary values. That is, use Field fields for strings, numbers, and boolean values. If your attribute data does need converted, use one of the Field subclasses from the remoteobjects.fields module to encode and decode your data as appropriate.
If your attribute needs converted specially, override the decode() and encode() methods in a new subclass of Field. For example, the fields.Datetime subclass of Field encodes Python datetime.datetime instances in a dictionary as timestamp strings.
Returns a User instance by their unique identifier.
Asserts that the id parameter is valid.
Returns a User instance by their url identifier.
Profile URL identifiers must contain only letters, numbers, and underscores.
A URI that uniquely identifies this User.
A user’s id URI is unique across groups, TypePad environments, and time. When associating local content to a user, use this identifier as the “foreign key” to an API user.
A TypePadObject property representing a link from one TypePad API object to another.
This Link works like remoteobjects.fields.Link, but builds links using the TypePad API URL scheme. That is, a Link on /asset/1.json called events links to /asset/1/events.json.
A TypePadObject property representing a link from one TypePad API object to another.
This Link works like remoteobjects.fields.Link, but builds links using the TypePad API URL scheme. That is, a Link on /asset/1.json called events links to /asset/1/events.json.
The identifying part of the User‘s chosen TypePad Profile URL.
This identifier is unique across groups, but not across TypePad environments. TypePad users can change their Profile URLs, so this identifier can also change over time for a given user. Use this name when constructing a link to the user’s profile on your local site. (Use the User instance’s profile_page_url field for the full TypePad Profile URL.)
A TypePadObject property representing a link from one TypePad API object to another.
This Link works like remoteobjects.fields.Link, but builds links using the TypePad API URL scheme. That is, a Link on /asset/1.json called events links to /asset/1/events.json.
An identifier for this User that can be used in URLs.
A user’s url_id is unique only across groups in one TypePad environment, so you should use id, not url_id, to associate data with a User. When constructing URLs to API resources in one particular TypePad environment, however, use url_id.
Additional profile information about a TypePad user.
This additional information is useful when showing information about a TypePad account directly, but is generally not required when linking to an ancillary TypePad account, such as the author of a post.
The biographical text provided by the User.
This text is displayed on the user’s TypePad Profile page. The string may contain multiple lines of text separated by newline characters.
A property for encoding object attributes as dictionary values and decoding dictionary values into object attributes.
Declare a Field instance for each attribute of a DataObject that should be encoded to or decoded from a dictionary.
Use a Field instance directly for simple DataObject attributes that can be the same type as their dictionary values. That is, use Field fields for strings, numbers, and boolean values. If your attribute data does need converted, use one of the Field subclasses from the remoteobjects.fields module to encode and decode your data as appropriate.
If your attribute needs converted specially, override the decode() and encode() methods in a new subclass of Field. For example, the fields.Datetime subclass of Field encodes Python datetime.datetime instances in a dictionary as timestamp strings.
The URL of the related user’s following widget.
Use this URL in an HTML iframe to provide an interface for following this user. The iframe should be 300 pixels wide and 125 pixels high.
A property for encoding object attributes as dictionary values and decoding dictionary values into object attributes.
Declare a Field instance for each attribute of a DataObject that should be encoded to or decoded from a dictionary.
Use a Field instance directly for simple DataObject attributes that can be the same type as their dictionary values. That is, use Field fields for strings, numbers, and boolean values. If your attribute data does need converted, use one of the Field subclasses from the remoteobjects.fields module to encode and decode your data as appropriate.
If your attribute needs converted specially, override the decode() and encode() methods in a new subclass of Field. For example, the fields.Datetime subclass of Field encodes Python datetime.datetime instances in a dictionary as timestamp strings.
The URL the related user has specified as an external website URL.
If the related user has not specified an external website URL, homepage_url will be None.
The URL of a page where the user can manage their community memberships.
This URL is only present when the UserProfile is requested on behalf of the related user. That is, the membership_management_page_url is None unless the user is viewing their own profile.
The name the related user chose for use in their TypePad profile URL.
This name can be used as an ID to select this user in a transient URL. As this name can be changed, use the url_id field as a persistent key instead.
The URL of a page where the user can edit their profile information.
This URL is only present when the UserProfile is requested on behalf of the related user. That is, the profile_edit_page_url is None unless the user is viewing their own profile.
An identifier for this UserProfile that can be used in URLs.
A user’s url_id is unique only across groups in one TypePad environment, so you should use id, not url_id, to associate data with a User (or UserProfile). When constructing URLs to API resources in one particular TypePad environment, however, use url_id.
An entry in a blog.
A link to a web video.
Given a size, return a VideoLink of a video that is as wide as the requested size.
This mode scales the video such that the width is the size specified and the height is scaled to maintain the video’s aspect ratio.
A URL to the HTML permalink page of the video.
Use this field to specify the video when posting a new Video asset. When requesting an existing Video instance from the API, permalink_url will be None.
Returns the XID portion of the given Atom ID for a TypePad content object.
If the given Atom ID is not the same format as a TypePad content object’s Atom ID, returns None.