phpDocumentor deviantartfeed
[ class tree: deviantartfeed ] [ index: deviantartfeed ] [ all elements ]

Class: deviantartfeed

Source Location: /deviantart.php

Class deviantartfeed

Class Overview

Scrapes a recent deviations feed together from deviantart.

Uses a json formatted string from deviantart which works currently, however any changes will most likley break this. Hopefully only the xsl would need to be updated in such an event.

GENERAL DISCLAIMER

I am not personally affiliated with DeviantART in any way. Use of the DeviantART website by its Terms Of Service. I am not responsible for the way you use this script. The use of this script to scrape your DeviantART user gallery may be in breach of your agreement with DeviantART.

LICENSE

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Located in /deviantart.php [line 41]



		
				Author(s):
		
		
		
Information Tags:
Copyright:  Copyright (c) 2008, Stephen Ingram
Todo:  The title and date regex is quick and dirty, it could easily be tripped up.
Todo:  Investigate further what sort of output the DeviantART "DiFi" script will generate.

Properties

Methods

[ Top ]
Constant Summary
config_file   Location of config file

[ Top ]
Property Summary
string   $cache   Filesystem path to cache file.
array   $conf   Holds loaded config array

[ Top ]
Method Summary
static string   xsl_get_date()   Gets the artwork date in RFC 2822 format from the proviced string
static string   xsl_get_title()   Gets the artwork title from the proviced string
static string   xsl_make_local_cache()   Downloads a local cache of specified file.
deviantartfeed   __construct()   Constructor does all the work
void   output_cache()   Return or send cache depenging on setting

[ Top ]
Properties
string   $cache [line 65]

Filesystem path to cache file.

API Tags:
Access:  public


[ Top ]
array   $conf [line 58]

Holds loaded config array

API Tags:
Access:  public


[ Top ]
Methods
static method xsl_get_date  [line 278]

  static string xsl_get_date( string $string  )

Gets the artwork date in RFC 2822 format from the proviced string

I'm assuming that deviantart records dates in UTC time, however I could be wrong.

Parameters:
string   $string:  Vale of title attribute from input xml

API Tags:
Return:  Artwork date
Access:  public


[ Top ]
static method xsl_get_title  [line 254]

  static string xsl_get_title( string $string  )

Gets the artwork title from the proviced string

Parameters:
string   $string:  Vale of title attribute from input xml

API Tags:
Return:  Artwork title
Access:  public


[ Top ]
static method xsl_make_local_cache  [line 224]

  static string xsl_make_local_cache( string $url, [string $base = ''], [string $path = '']  )

Downloads a local cache of specified file.

Parameters:
string   $url: 
string   $base:  URL base to apply to output URL
string   $path:  Path base for local filesystem path.

API Tags:
Return:  URL to local cache.
Access:  public


[ Top ]
Constructor __construct  [line 72]

  deviantartfeed __construct( )

Constructor does all the work


API Tags:
Access:  public


[ Top ]
output_cache  [line 186]

  void output_cache( )

Return or send cache depenging on setting

If not in cron mode sends the contents of the cache file to the user, otherwise simply returns void.


API Tags:
Access:  public


[ Top ]
Constants
config_file = 'deviantart.ini' [line 51]

Location of config file

If you move or rename the deviantart.ini file you must edit this path.


[ Top ]

Documentation generated on Thu, 04 Sep 2008 02:21:51 +1000 by phpDocumentor 1.4.1