LJJournal
Abstract
A journal object.
Discussion
An LJJournal object allows access to the entries stored in that journal.
You do not create instances of this class; rather, you get instances from
the [LJAccount journals] method.
The getEntry... methods will return LJEntry objects.
The getSummary... methods will return LJEntrySummary objects.
Methods
Abstract: Obtain the account the receiver belongs to.
- (LJAccount *)account;
Abstract: Returns the URL of the receiver's calendar view.
- (NSURL *)calendarHttpURL;
Abstract: Returns the URL of the receiver's calendar view for a given day.
- (NSURL *)calendarHttpURLForDay:(NSDate *)date;
Abstract: Returns the URL of the receiver's friends entries view.
- (NSURL *)friendsEntriesHttpURL;
Abstract: Obtain a dictionary mapping days to entry counts.
- (NSDictionary *)getDayCounts;
Returns an NSDictionary with NSCalendarDate objects as keys and NSNumbers as values,
representing the number of entries available for the given date.
Abstract: Obtain an array of all entries posted on a given day.
- (NSArray *)getEntriesForDay:(NSDate *)date;
Parameters
Name | Description |
date | The date to retrieve entries for. |
Result: An array of LJEntry objects.
Abstract: Obtain an array of the n most recent entries before a specified date.
- (NSArray *)getEntriesLastN:(int)n;
Parameters
Name | Description |
n | The number of entries to download. |
Result: An array of LJEntry objects.
Abstract: Obtain an array of the n most recent entries.
- (NSArray *)getEntriesLastN:(int)n beforeDate:(NSDate *)date;
Parameters
Name | Description |
n | The number of entries to download. |
date | Retrieve entries posted before this date. |
Result: An array of LJEntry objects.
- (LJEntry *)getEntryForItemID:(int)itemID;
If an entry's itemID is known, you can retrieve it directly with this method.
Note that the itemID is different from the itemID which appears on the web.
Parameters
Name | Description |
itemID | The itemID of the desired entry. |
Result: The desired LJEntry object if found, nil otherwise.
- (LJEntry *)getMostRecentEntry;
This method returns the most recent entry posted to the receiver.
Abstract: Obtain summaries of all entries posted on a given day.
- (NSArray *)getSummariesForDay:(NSDate *)date;
Parameters
Name | Description |
date | The date to receive summaries for. |
Result: An array of LJSummaryEntry objects.
Abstract: Obtain summaries of the n most recent entries.
- (NSArray *)getSummariesLastN:(int)n;
Parameters
Name | Description |
n | The number of summaries to download. |
Result: An array of LJSummaryEntry objects.
Abstract: Obtain summaries of the n most recent entries before a specified date.
- (NSArray *)getSummariesLastN:(int)n beforeDate:(NSDate *)date;
Parameters
Name | Description |
n | The number of summaries to download. |
date | Retrieve summaries posted before this date. |
Result: An array of LJSummaryEntry objects.
- (LJEntrySummary *)getSummaryForItemID:(int)itemID;
If an entry's itemID is known, you can retrieve a summary directly with this method.
Note that the itemID is different from the itemID which appears on the web.
Parameters
Name | Description |
itemID | The itemID of the desired entry. |
Result: The desired LJEntrySummary object if found, nil otherwise.
Abstract: Determine if the receiver is the default journal for its account.
- (BOOL)isDefault;
The default journal is the journal with the same name as the account's username.
Abstract: Obtain the name of the receiver.
- (NSString *)name;
Abstract: Returns the URL of the receiver's recent entries view.
- (NSURL *)recentEntriesHttpURL;
+ (void)setEntrySummaryLength:(int)length;
This method allows you to choose the length of the summary string returned by
the getSummaries... methods.
Parameters
Name | Description |
length | The length of summary strings. |
(Last Updated 2/17/2003)