Specifications of spAnnouncement API

masateru_tomiok
Kilo Expert

The announcement widget's client script uses the spAnnouncement API.

find_real_file.png

The widget editor can not refer to methods by Ctrl + Space. I want to know what methods are provided for study.

Are there anydocuments or information?

1 ACCEPTED SOLUTION
5 REPLIES 5

vims
Kilo Expert

Hi,

There is no official documentation available. Below are the available methods in the spAnnouncements API

 

dismiss(id)

filterOnType(type)

get(query,limit,page)

init(announcements)

subscribe(scope, callback)

 

Regards,

Vimal

Where did you see these functions?

Jace Benson
Mega Sage

Based on my information, its a client directive;  You should be able to see the code at

https://hi.service-now.com/scripts/app.$sp/directive.spAnnouncements.js

I have a copy saved off here;

https://github.com/jacebenson/sndocs/blob/master/sources/madrid/0/scripts/app.%24sp/directive.spAnno...

Hi,

That gitbub link is broken.

spAnnouncement is injected into the client script which I belive must be some kind of AngularJS service or so?

I cannot find the code for this service, it is also not listed in the Angular Providers or Dependencies of this Widget. What is spAnnouncement?

 

See the client script:

 

function($scope, $timeout, $location, spAnnouncement, spUtil, spAriaUtil) {

...

}

 

TIA