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

account

Abstract: Obtain the account the receiver belongs to.
- (LJAccount *)account; 


calendarHttpURL

Abstract: Returns the URL of the receiver's calendar view.
- (NSURL *)calendarHttpURL; 


calendarHttpURLForDay:

Abstract: Returns the URL of the receiver's calendar view for a given day.
- (NSURL *)calendarHttpURLForDay:(NSDate *)date; 


friendsEntriesHttpURL

Abstract: Returns the URL of the receiver's friends entries view.
- (NSURL *)friendsEntriesHttpURL; 


getDayCounts

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.


getEntriesForDay:

Abstract: Obtain an array of all entries posted on a given day.
- (NSArray *)getEntriesForDay:(NSDate *)date; 

Parameters

NameDescription
dateThe date to retrieve entries for.
Result: An array of LJEntry objects.

getEntriesLastN:beforeDate:

Abstract: Obtain an array of the n most recent entries before a specified date.
- (NSArray *)getEntriesLastN:(int)n; 

Parameters

NameDescription
nThe number of entries to download.
Result: An array of LJEntry objects.

getEntriesLastN:beforeDate:

Abstract: Obtain an array of the n most recent entries.
- (NSArray *)getEntriesLastN:(int)n beforeDate:(NSDate *)date; 

Parameters

NameDescription
nThe number of entries to download.
dateRetrieve entries posted before this date.
Result: An array of LJEntry objects.

getEntryForItemID:

- (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

NameDescription
itemIDThe itemID of the desired entry.
Result: The desired LJEntry object if found, nil otherwise.

getMostRecentEntry

- (LJEntry *)getMostRecentEntry; 

This method returns the most recent entry posted to the receiver.


getSummariesForDay:

Abstract: Obtain summaries of all entries posted on a given day.
- (NSArray *)getSummariesForDay:(NSDate *)date; 

Parameters

NameDescription
dateThe date to receive summaries for.
Result: An array of LJSummaryEntry objects.

getSummariesLastN:

Abstract: Obtain summaries of the n most recent entries.
- (NSArray *)getSummariesLastN:(int)n; 

Parameters

NameDescription
nThe number of summaries to download.
Result: An array of LJSummaryEntry objects.

getSummariesLastN:beforeDate:

Abstract: Obtain summaries of the n most recent entries before a specified date.
- (NSArray *)getSummariesLastN:(int)n beforeDate:(NSDate *)date; 

Parameters

NameDescription
nThe number of summaries to download.
dateRetrieve summaries posted before this date.
Result: An array of LJSummaryEntry objects.

getSummaryForItemID:

- (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

NameDescription
itemIDThe itemID of the desired entry.
Result: The desired LJEntrySummary object if found, nil otherwise.

isDefault

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.


name

Abstract: Obtain the name of the receiver.
- (NSString *)name; 


recentEntriesHttpURL

Abstract: Returns the URL of the receiver's recent entries view.
- (NSURL *)recentEntriesHttpURL; 


setEntrySummaryLength:

+ (void)setEntrySummaryLength:(int)length; 

This method allows you to choose the length of the summary string returned by the getSummaries... methods.

Parameters

NameDescription
lengthThe length of summary strings.

(Last Updated 2/17/2003)