9 Reusable Code Snippet Topics

Remove Filter
Member Avatar for
Member Avatar for Dani

This is the code behind the demo at https://www.daniweb.com/connect/oauth/demo

1
3K
Member Avatar for pritaeas

Attached is the code for my RSS dashboard, using the DaniWeb API. It's an improved version of the mashup I posted earlier, using jQuery to get all feeds asynchronously. The part which initially loads the forums is shown below. It creates an API object, and a Parser object. The first …

Member Avatar for pritaeas
1
453
Member Avatar for riahc3

Hello This is a demo showing Java interacting with Daniweb's new API ( http://www.daniweb.com/api/documentation ) You introduce a member's name and it should show you the total number of posts he has made. Demo is a proof of concept: No bug checking, error checking, etc is in this code. In …

Member Avatar for peter_budo
4
869
Member Avatar for riahc3
Member Avatar for pritaeas

Here's my base class and class for the unauthenticated DaniWeb API calls. Not every method has all features implemented yet, and it's not been fully tested either. Here's how to start using it: include 'DwApiBase.class.php'; include 'DwApiOpen.class.php'; $dwapi = new DwApiOpen(); $result = $dwapi->GetMemberActivityPoints(94719); $result = $dwapi->GetMemberEndorsements(94719); $result = $dwapi->GetMemberReputationComments(94719); …

Member Avatar for pritaeas
2
424
Member Avatar for diafol

OK, as promised, here's an updated 'quick(!) and dirty' class for retrieving and setting data via the Daniweb API. It allows the extraction of data based around: # DATA RETRIEVAL & SETTING # ## non-OAuth ## * forums * articles * posts * members * activity points * endorsements * …

Member Avatar for LastMitch
2
530
Member Avatar for diafol

# As of 4/4/2013 # This class has now been updated and posted here: http://www.daniweb.com/web-development/php/code/451674/all-in-one-daniweb-api-class# # ORIGINAL POST # This code can be used to retrieve a forum list with various options with regard to display. This class could be extended for articles, posts, etc etc. The retrieval methods include …

Member Avatar for diafol
3
452
Member Avatar for pritaeas

## RSS Class ## The code snippet is a PHP class for retrieving RSS feeds from the DaniWeb website. There are two exposed methods, one for retrieving the list of predefined article types, and another to get a specific RSS feed. If you pass parameters to this method, there is …

Member Avatar for pritaeas
1
535
Member Avatar for pritaeas

## API Mashup ## This example is a mashup of [diafol's class](http://www.daniweb.com/web-development/php/code/451428/daniweb-api-class-for-getting-forums), [Dani's parsing code](http://www.daniweb.com/api/documentation) and [my class](http://www.daniweb.com/web-development/php/code/451390/daniweb-api-rss-class). It uses diafol's dwAPI class to retrieve a list of all forums, loops through them, and uses my Rss class to get the respective RSS feeds. It will show each forum in …

Member Avatar for diafol
0
547

The End.