CSS-selectable HTML in API documentation

17 views
Skip to first unread message

Martin Mauch

unread,
Feb 2, 2015, 7:28:06 AM2/2/15
to adwords...@googlegroups.com
Dear AdWords Script team,

would it be possible to change the generated API HTML so that it includes IDs and classes than can be consumed in an automated way?
I am trying to extract Scala-js class definitions for the AdWords API (so I can finally write AdWords scripts in a type-safe language with full IDE support) and the lack of locateable HTML elements makes this much harder than necessary.
This would also be useful for other type-safe compiles-to-js languages like Dart, TypedScript, PureScript, ...

The Apps Script API documents have a nice, parseable structure, so if you could reuse their layout that would be great :D

Thanks!
  Martin

Alexander Wang

unread,
Feb 3, 2015, 2:42:27 PM2/3/15
to adwords...@googlegroups.com
Hi Martin,

If we add class names to the table of methods for each class, the table of arguments for each function and to the function header (e.g. setSchedules(schedules)), would that be sufficient? Are there other elements in our reference that you'd like a reference to?

Adding class names / ids to the API HTML should be easy enough.

Cheers,
Alex

Martin Mauch

unread,
Feb 3, 2015, 7:57:55 PM2/3/15
to adwords...@googlegroups.com
Hi Alex, thanks for your response!

For me, the best option would be if classes were similar to the Apps Script docs, which means
  • <div class="type doc">  around the class description (Apps Script docs are a little ambiguous because here the doc class is just for the description, for functions it's for everything including parameters and return type)
  • <table class="members property"> for the properties table
  • <table class="members function"> for the method table
  • <div id="..." class="function doc"> around each method section in the details view, and inside that
    • <div class="function description"> around the method description (Apps Script docs don't have that unfortunately)
    • <table class="function param"> for the method arguments table
    • <table class="function returns"> for the return values table (Apps Script docs don't have that unfortunately)
Optionally you could add classes for the h1 (class name) and h2 (method name) elements, in case you later decide that you'd like to use h1 or h2 for something else as well.

Hope that's not too big a request, but it will help a lot :D

Best
  Martin

Alexander Wang

unread,
Feb 3, 2015, 8:05:24 PM2/3/15
to adwords...@googlegroups.com
Hi Martin,

I've noted the request internally. I don't think it's much work for us to implement, but not certain how soon we'll be able to address it. I'll update this thread when we've made the changes.

Cheers,
Alex

Martin Mauch

unread,
Feb 3, 2015, 8:16:52 PM2/3/15
to adwords...@googlegroups.com
Nice, thanks! :D
Reply all
Reply to author
Forward
0 new messages